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.



150
151
152
153
154
155
156
157
158
# File 'lib/tcr/recordable_tcp_socket.rb', line 150

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

#cipherObject



164
165
166
# File 'lib/tcr/recordable_tcp_socket.rb', line 164

def cipher
  []
end

#connectObject



208
209
210
# File 'lib/tcr/recordable_tcp_socket.rb', line 208

def connect
  self
end

#connect_nonblockObject



204
205
206
# File 'lib/tcr/recordable_tcp_socket.rb', line 204

def connect_nonblock(*)
  self
end

#flushObject



180
181
182
# File 'lib/tcr/recordable_tcp_socket.rb', line 180

def flush
  self
end

#hostname=(args) ⇒ Object



191
192
# File 'lib/tcr/recordable_tcp_socket.rb', line 191

def hostname=(args)
end

#ioObject



194
195
196
# File 'lib/tcr/recordable_tcp_socket.rb', line 194

def io
  self
end

#post_connection_check(*args) ⇒ Object



212
213
214
# File 'lib/tcr/recordable_tcp_socket.rb', line 212

def post_connection_check(*args)
  true
end

#sessionObject



184
185
186
# File 'lib/tcr/recordable_tcp_socket.rb', line 184

def session
  self
end

#session=(args) ⇒ Object



188
189
# File 'lib/tcr/recordable_tcp_socket.rb', line 188

def session=(args)
end

#shutdownObject



198
199
200
201
202
# File 'lib/tcr/recordable_tcp_socket.rb', line 198

def shutdown
  if live
    socket.io.shutdown
  end
end

#ssl_versionObject



160
161
162
# File 'lib/tcr/recordable_tcp_socket.rb', line 160

def ssl_version
  ""
end

#syncObject



172
173
174
# File 'lib/tcr/recordable_tcp_socket.rb', line 172

def sync
  self
end

#sync=(arg) ⇒ Object



176
177
178
# File 'lib/tcr/recordable_tcp_socket.rb', line 176

def sync=(arg)
  self
end

#sync_close=(arg) ⇒ Object



168
169
170
# File 'lib/tcr/recordable_tcp_socket.rb', line 168

def sync_close=(arg)
  true
end