Network Protocol
This page documents the types of messages that the client and server can exchange.
For the actual network connection see wiki/Network and for the encoding and compression of the messages see wiki/PacketEncoding.
- General packets that flow in both direction:
Packet Type | Arguments | Purpose | Actions Required
|
---|
hello | a dictionary containing connection options and capabilities | authentication (if required), setup of keyboard, configuration options, etc | either accept the connection and send a hello back as acknowledgement, send a challenge request or disconnect
|
ping | time to be echoed back | monitor connection state, collect latency statistics | The receiver must send a ping-echo back
|
ping-echo | echoed time, load average, measured latency | response to ping | none, it should be used to collect latency statistics
|
sound-data | sound buffers and associated metadata | forward sound data | the receiver should queue the sound buffer, it may drop them if desired - if so, it should tell the other end to stop sending
|
connection-lost | none | sent by the network layer when the network connection has dropped | free any resources
|
gibberish | none | sent by the network layer when the network received unparseable data, data decompression failed or decryption failed | disconnect the connection and free any resources
|
- Packets sent by the server
Packet Type | Arguments | Purpose | Actions Required | Client Capability Required
|
---|
startup-complete | none | notifies the client that all the windows have been sent | none | notify-startup-complete
|
new-window | many||tells the client to create a new window | the client should show the new window, it should eventually send a map-window packet with the location of the window | none
|