class QuartzTorrent::KeepAlive
KeepAlive
message. Sent periodically to ensure peer is available.
Public Class Methods
new()
click to toggle source
Calls superclass method
QuartzTorrent::PeerWireMessage::new
# File lib/quartz_torrent/peermsg.rb, line 126 def initialize super(MessageKeepAlive) end
Public Instance Methods
length()
click to toggle source
# File lib/quartz_torrent/peermsg.rb, line 130 def length 4 end
serializeTo(io)
click to toggle source
# File lib/quartz_torrent/peermsg.rb, line 134 def serializeTo(io) # A KeepAlive is just a 4byte length set to 0. io.write [0].pack("N") end
unserialize(payload)
click to toggle source
# File lib/quartz_torrent/peermsg.rb, line 139 def unserialize(payload) end