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.



122
123
124
125
126
127
128
129
130
# File 'lib/tcr/recordable_tcp_socket.rb', line 122

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



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

def connect
  self
end

#connect_nonblockObject



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

def connect_nonblock(*)
  self
end

#flushObject



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

def flush
  self
end

#ioObject



155
156
157
# File 'lib/tcr/recordable_tcp_socket.rb', line 155

def io
  self
end

#post_connection_check(*args) ⇒ Object



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

def post_connection_check(*args)
  true
end

#sessionObject



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

def session
  self
end

#session=(args) ⇒ Object



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

def session=(args)
end

#shutdownObject



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

def shutdown
  if live
    socket.io.shutdown
  end
end

#syncObject



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

def sync
  self
end

#sync=(arg) ⇒ Object



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

def sync=(arg)
  self
end

#sync_close=(arg) ⇒ Object



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

def sync_close=(arg)
  true
end