Class: Rex::Proto::Kademlia::Pong
- Defined in:
- lib/rex/proto/kademlia/pong.rb
Overview
A Kademlia pong message.
Constant Summary
Constants inherited from Message
Message::COMPRESSED_PACKET, Message::STANDARD_PACKET
Instance Attribute Summary collapse
-
#port ⇒ Integer
readonly
The source port from which the PING was received.
Attributes inherited from Message
Class Method Summary collapse
-
.from_data(data) ⇒ Pong
Builds a pong from given data.
Instance Method Summary collapse
-
#initialize(port = nil) ⇒ Pong
constructor
A new instance of Pong.
-
#to_str ⇒ String
Get this Pong as a String.
Methods inherited from Message
Constructor Details
Instance Attribute Details
#port ⇒ Integer (readonly)
Returns the source port from which the PING was received.
14 15 16 |
# File 'lib/rex/proto/kademlia/pong.rb', line 14 def port @port end |
Class Method Details
Instance Method Details
#to_str ⇒ String
Get this Pong as a String
35 36 37 |
# File 'lib/rex/proto/kademlia/pong.rb', line 35 def to_str super + [@port].pack('v') end |