Module: Arachni::RPC::EM::ConnectionUtilities
- Included in:
- Arachni::RPC::EM::Client::Handler, SSL, Server::Proxy
- Defined in:
- lib/arachni/rpc/em/connection_utilities.rb
Overview
Helper methods to be included in EventMachine::Connection classes
@author: Tasos “Zapotek” Laskos
<[email protected]>
<[email protected]>
@version: 0.1
Instance Method Summary collapse
-
#peer_ip_addr ⇒ String
IP address of the client.
Instance Method Details
#peer_ip_addr ⇒ String
Returns IP address of the client.
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/arachni/rpc/em/connection_utilities.rb', line 26 def peer_ip_addr begin if peername = get_peername Socket.unpack_sockaddr_in( peername )[1] else 'n/a' end rescue 'n/a' end end |