class

RNS::AutoInterfacePeer

Inherits RNS::Interface < Reference < Object

AutoInterfacePeer represents a single discovered peer. Each peer communicates via unicast UDP on the data port. Ports the AutoInterfacePeer class from RNS/Interfaces/AutoInterface.py.

Constructors

new(owner : AutoInterface, addr : String, ifname : String)
Source

Instance methods

addr
Source
detach

Called when the interface is being detached/removed

Source
dir_in
Source
dir_in=(dir_in : Bool)
Source
dir_out
Source
dir_out=(dir_out : Bool)
Source
ifname
Source
owner
Source
process_incoming(data : Bytes, addr : String | Nil = nil)
Source
process_outgoing(data : Bytes)

Send data out through the interface. Subclasses must implement this.

Source
teardown

Tear down the interface, releasing any resources (sockets, fibers, etc.). Subclasses should override to close their specific resources.

Source
to_s(io : IO)

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Source