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.



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

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



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

def connect
  self
end

#connect_nonblockObject



182
183
184
# File 'lib/tcr/recordable_tcp_socket.rb', line 182

def connect_nonblock(*)
  self
end

#flushObject



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

def flush
  self
end

#ioObject



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

def io
  self
end

#post_connection_check(*args) ⇒ Object



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

def post_connection_check(*args)
  true
end

#sessionObject



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

def session
  self
end

#session=(args) ⇒ Object



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

def session=(args)
end

#shutdownObject



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

def shutdown
  if live
    socket.io.shutdown
  end
end

#syncObject



153
154
155
# File 'lib/tcr/recordable_tcp_socket.rb', line 153

def sync
  self
end

#sync=(arg) ⇒ Object



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

def sync=(arg)
  self
end

#sync_close=(arg) ⇒ Object



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

def sync_close=(arg)
  true
end