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.



131
132
133
134
135
136
137
138
139
# File 'lib/tcr/recordable_tcp_socket.rb', line 131

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



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

def connect
  self
end

#connect_nonblockObject



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

def connect_nonblock(*)
  self
end

#flushObject



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

def flush
  self
end

#ioObject



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

def io
  self
end

#post_connection_check(*args) ⇒ Object



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

def post_connection_check(*args)
  true
end

#sessionObject



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

def session
  self
end

#session=(args) ⇒ Object



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

def session=(args)
end

#shutdownObject



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

def shutdown
  if live
    socket.io.shutdown
  end
end

#syncObject



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

def sync
  self
end

#sync=(arg) ⇒ Object



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

def sync=(arg)
  self
end

#sync_close=(arg) ⇒ Object



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

def sync_close=(arg)
  true
end