TCPClient
Summary
Reliable, ordered WebSocket-based client connection to a NanoForge TCP server.Signature
Constructors
constructor
Constructs a new instance of the classMethods
connect
Initiate a WebSocket connection to the server.getReceivedPackets
Parse and return all complete packets received since the last call.isConnected
Return when the underlying WebSocket is open.sendData
Send a payload to the server.Remarks
Packets are framed with a configurable magic delimiter so that partial WebSocket frames can be reassembled. The connection is established by callingconnect and status can be queried with isConnected. Typical usage is through NetworkClientLibrary which instantiates and connects this class automatically during __init.