class

RNS::WeaveInterfacePeer

Inherits RNS::Interface < Reference < Object

Represents an individual Weave peer connection. Handles per-peer packet processing with deduplication.

Constructors

new(owner : WeaveInterface, endpoint_addr : Bytes)
Source

Instance methods

_online
Source
_online=(_online : Bool)
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
endpoint_addr
Source
endpoint_addr=(endpoint_addr : Bytes)
Source
online
Source
online=(value : Bool)
Source
peer_addr
Source
peer_addr=(peer_addr : Bytes | Nil)
Source
process_incoming(data : Bytes, endpoint_addr : Bytes | 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
via_switch_id
Source
via_switch_id=(via_switch_id : Bytes | Nil)
Source