class

RNS::I2PInterface

Inherits RNS::Interface < Reference < Object

Constants

BITRATE_GUESS = 256000_i64
DEFAULT_IFAC_SIZE = 16

Constructors

new(configuration : Hash(String, String), inbound_callback : Proc(Bytes, Interface, Nil) | Nil = nil)

Full constructor matching Python I2PInterface.init

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

Minimal constructor for testing

Source

Instance methods

b32=(b32 : String | Nil)
Source
bind_ip
Source
bind_ip=(bind_ip : String)
Source
bind_port
Source
bind_port=(bind_port : Int32)
Source
clients
Source
connectable
Source
connectable=(connectable : 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
incoming_connection(socket : TCPSocket)
Source
process_outgoing(data : Bytes)

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

Source
received_announce(from_spawned : Bool = false)
Source
sent_announce(from_spawned : Bool = false)
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