class RBMK::Peer
Attributes
host[RW]
port[RW]
socket[RW]
Public Class Methods
new(client)
click to toggle source
# File lib/rbmk/peer.rb, line 5 def initialize client @socket = client @host, @port = client.peeraddr.values_at 3, 1 end
Public Instance Methods
close()
click to toggle source
# File lib/rbmk/peer.rb, line 10 def close @socket.close end
to_s()
click to toggle source
# File lib/rbmk/peer.rb, line 14 def to_s sprintf '%s:%s', @host, @port end