Class: TCR::RecordableSSLSocket

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/tcr/recordable_tcp_socket.rb

Instance Method Summary collapse

Constructor Details

#initialize(tcr_socket) ⇒ RecordableSSLSocket

Returns a new instance of RecordableSSLSocket.



114
115
116
117
118
119
120
121
122
# File 'lib/tcr/recordable_tcp_socket.rb', line 114

def initialize(tcr_socket)
  super(tcr_socket)
  tcr_socket.send(:_intercept_socket) do |sock|
    socket = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new)
    socket.sync_close = true
    socket.connect
    socket
  end
end

Instance Method Details

#connectObject



145
146
147
# File 'lib/tcr/recordable_tcp_socket.rb', line 145

def connect
  self
end

#ioObject



135
136
137
# File 'lib/tcr/recordable_tcp_socket.rb', line 135

def io
  self
end

#post_connection_check(*args) ⇒ Object



149
150
151
# File 'lib/tcr/recordable_tcp_socket.rb', line 149

def post_connection_check(*args)
  true
end

#sessionObject



128
129
130
# File 'lib/tcr/recordable_tcp_socket.rb', line 128

def session
  self
end

#session=(args) ⇒ Object



132
133
# File 'lib/tcr/recordable_tcp_socket.rb', line 132

def session=(args)
end

#shutdownObject



139
140
141
142
143
# File 'lib/tcr/recordable_tcp_socket.rb', line 139

def shutdown
  if live
    socket.io.shutdown
  end
end

#sync_close=(arg) ⇒ Object



124
125
126
# File 'lib/tcr/recordable_tcp_socket.rb', line 124

def sync_close=(arg)
  true
end