Class: Quaff::TCPSourceFromSocket
- Defined in:
- lib/sources.rb
Instance Attribute Summary
Attributes inherited from TCPSource
Instance Method Summary collapse
-
#initialize(sock) ⇒ TCPSourceFromSocket
constructor
A new instance of TCPSourceFromSocket.
Methods inherited from TCPSource
Methods inherited from Source
#close, #remote_ip, #remote_port, #sock, #to_s
Constructor Details
#initialize(sock) ⇒ TCPSourceFromSocket
Returns a new instance of TCPSourceFromSocket.
63 64 65 66 67 |
# File 'lib/sources.rb', line 63 def initialize sock @transport = "TCP" @sock = sock @port, @ip = Socket.unpack_sockaddr_in(@sock.getpeername) end |