Class: TCPSocket
- Inherits:
-
Object
- Object
- TCPSocket
- Defined in:
- lib/tcp_socket.rb
Instance Method Summary collapse
Instance Method Details
#ready_to_read?(timeout = 5) ⇒ Boolean
6 7 8 9 |
# File 'lib/tcp_socket.rb', line 6 def ready_to_read?(timeout=5) r,_,__ = IO.select([self], nil, nil, timeout) return r.first == self end |
#remote_ip ⇒ Object
2 3 4 |
# File 'lib/tcp_socket.rb', line 2 def remote_ip peeraddr.last.split(':').last end |