class Ciri::P2P::Discovery::Protocol::To
a struct represent which node is target of this packet
Public Class Methods
from_host_port(host, port)
click to toggle source
# File lib/ciri/p2p/discovery/protocol.rb, line 158 def from_host_port(host, port) new(recipient_ip: host.is_a?(IPAddr) ? host.to_i : IPAddr.new(host).to_i, recipient_udp_port: port) end
from_inet_addr(address)
click to toggle source
# File lib/ciri/p2p/discovery/protocol.rb, line 154 def from_inet_addr(address) from_host_port(address.ip_address, address.ip_port) end