[−][src]Module tox_packet::relay
Top-level TCP Packets according to Tox spec
Modules
connection_id | Connection ID definition. |
Structs
ConnectNotification | Sent by server to client.
Tell the client that connection_id is now connected meaning the other
is online and data can be sent using this |
Data | Sent by client to server.
The client sends data with |
DisconnectNotification | Sent by client to server.
Sent when client wants the server to forget about the connection related
to the connection_id in the notification. Server must remove this connection
and must be able to reuse the |
EncryptedPacket | Packets are encrypted and sent in this form. |
OnionRequest | Sent by client to server.
The server will pack payload from this request to |
OnionResponse | Sent by server to client.
The server just sends payload from |
OobReceive | Sent by server to client. OOB recv are sent with the announced public key of the peer that sent the OOB send packet and the exact data. |
OobSend | Sent by client to server.
If a peer with private key equal to the key they announced themselves with is
connected, the data in the OOB send packet will be sent to that peer as an
OOB recv packet. If no such peer is connected, the packet is discarded. The
toxcore |
PingRequest | Sent by both client and server, both will respond.
Ping packets are used to know if the other side of the connection is still
live. TCP when established doesn't have any sane timeouts (1 week isn't sane)
so we are obliged to have our own way to check if the other side is still live.
Ping ids can be anything except 0, this is because of how toxcore sets the
variable storing the |
PongResponse | Sent by both client and server, both will respond.
The server should respond to ping packets with pong packets with the same |
RouteRequest | Sent by client to server.
Send a routing request to the server that we want to connect
to peer with public key where the public key is the public the peer
announced themselves as. The server must respond to this with a |
RouteResponse | Sent by server to client.
The response to the routing request, tell the client if the
routing request succeeded (valid |
Enums
DataPayload | Data payload enum. |
Packet | Top-level TCP packet. |
Constants
MAX_LINKS_N | |
MAX_TCP_ENC_PACKET_PAYLOAD_SIZE | A serialized EncryptedPacket payload should be not longer than 2048 bytes |
MAX_TCP_ENC_PACKET_SIZE | A serialized EncryptedPacket should be not longer than 2050 bytes |
MAX_TCP_PACKET_SIZE | A serialized Packet should be not longer than 2032 bytes |