You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to intercept reads and writes SSLSocket does into underlying TCPSocket?
I tried the following way, but overridden methods were not invoked:
class TCPSocket
def write(*args)
p "write"
super *args
end
def read(*args)
p "read"
super *args
end
end
Tcp_socket = TCPSocket.open '127.0.0.1', 80
ssl_context = OpenSSL::SSL::SSLContext.new
socket = OpenSSL::SSL::SSLSocket.new(Tcp_socket, ssl_context)
socket.connect
The text was updated successfully, but these errors were encountered:
Is there a way to intercept reads and writes SSLSocket does into underlying TCPSocket?
I tried the following way, but overridden methods were not invoked:
The text was updated successfully, but these errors were encountered: