class

RNS::RNodeTCPConnection

Inherits Reference < Object

TCP connection for RNode communication over network. Ports TCPConnection from RNS/Interfaces/RNodeInterface.py.

Constants

ACTIVITY_KEEPALIVE = ACTIVITY_TIMEOUT - 2.5
ACTIVITY_TIMEOUT = 6.0
CONNECT_TIMEOUT = 5.0
INITIAL_CONNECT_TIMEOUT = 5.0
RECONNECT_WAIT = 4.0
TARGET_PORT = 7633
TCP_PROBE_AFTER = 5
TCP_PROBE_INTERVAL = 2
TCP_PROBES = 12
TCP_USER_TIMEOUT = 24

Constructors

new(owner : RNodeInterface, target_host : String, connect : Bool = true)

For testing: create without connecting

Source

Instance methods

cleanup
Source
close
Source
connect(initial : Bool = false) : Bool
Source
connected
Source
connected=(connected : Bool)
Source
in_waiting
Source
is_open
Source
last_write
Source
last_write=(last_write : Float64)
Source
must_disconnect
Source
must_disconnect=(must_disconnect : Bool)
Source
read(n : Int32) : Bytes
Source
receive(data : Bytes)
Source
running
Source
running=(running : Bool)
Source
should_run
Source
should_run=(should_run : Bool)
Source
write(data : Bytes) : Int32
Source