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.



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

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



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

def connect
  self
end

#connect_nonblockObject



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

def connect_nonblock(*)
  self
end

#flushObject



170
171
172
# File 'lib/tcr/recordable_tcp_socket.rb', line 170

def flush
  self
end

#ioObject



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

def io
  self
end

#post_connection_check(*_args) ⇒ Object



196
197
198
# File 'lib/tcr/recordable_tcp_socket.rb', line 196

def post_connection_check(*_args)
  true
end

#sessionObject



174
175
176
# File 'lib/tcr/recordable_tcp_socket.rb', line 174

def session
  self
end

#session=(args) ⇒ Object



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

def session=(args); end

#shutdownObject



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

def shutdown
  socket.io.shutdown if live
end

#syncObject



162
163
164
# File 'lib/tcr/recordable_tcp_socket.rb', line 162

def sync
  self
end

#sync=(_arg) ⇒ Object



166
167
168
# File 'lib/tcr/recordable_tcp_socket.rb', line 166

def sync=(_arg)
  self
end

#sync_close=(_arg) ⇒ Object



158
159
160
# File 'lib/tcr/recordable_tcp_socket.rb', line 158

def sync_close=(_arg)
  true
end