class

RNS::LocalServerInterface

Inherits RNS::Interface < Reference < Object

Constants

AUTOCONFIGURE_MTU = true
HW_MTU_DEFAULT = 262144

Constructors

new(bindport : Int32, inbound_callback : Proc(Bytes, Interface, Nil) | Nil = nil)

TCP server constructor — binds to 127.0.0.1:port

Source
new(socket_path : String, inbound_callback : Proc(Bytes, Interface, Nil) | Nil = nil)

Unix domain socket server constructor

Source

Instance methods

bind_ip
Source
bind_port
Source
clients
Source
clients=(clients : Int32)
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
force_bitrate
Source
force_bitrate=(force_bitrate : Bool)
Source
incoming_connection_tcp(client_socket : TCPSocket)
Source
incoming_connection_unix(client_socket : UNIXSocket)
Source
is_local_shared_instance
Source
is_local_shared_instance=(is_local_shared_instance : Bool)
Source
process_outgoing(data : Bytes)

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

Source
received_announce(from_spawned = false)

Record an incoming announce timestamp

Source
sent_announce(from_spawned = false)

Record an outgoing announce timestamp

Source
socket_path
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