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]>
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.
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/arachni/rpc/em/connection_utilities.rb', line 23 def peer_ip_addr begin if peername = get_peername Socket.unpack_sockaddr_in( peername )[1] else 'n/a' end rescue 'n/a' end end |