class

RNS::SAMClient

Inherits Reference < Object

SAM protocol client for communicating with the I2P router. Implements the SAM v3 bridge protocol used by i2plib.

Constants

DEFAULT_SAM_HOST = "127.0.0.1"
DEFAULT_SAM_PORT = 7656
SAM_BUFSIZE = 4096

Constructors

new(sam_host : String = DEFAULT_SAM_HOST, sam_port : Int32 = DEFAULT_SAM_PORT)
Source

Instance methods

connect

Open a SAM connection and perform the handshake

Source
create_session(session_id : String, destination : String = "TRANSIENT", options : String = "") : TCPSocket

Create a SAM session (STREAM)

Source
generate_destination

Generate a new I2P destination keypair

Source
naming_lookup(name : String) : String | Nil

Look up an I2P destination to get the full base64 key

Source
sam_host
Source
sam_host=(sam_host : String)
Source
sam_port
Source
sam_port=(sam_port : Int32)
Source
stream_accept(session_id : String) : TCPSocket

Accept an incoming stream connection

Source
stream_connect(session_id : String, destination : String) : TCPSocket

Connect to a remote I2P destination via a stream session

Source