2.4.6.1. Commands from Server to Client¶
The Server sends commands to the Client over the reliable WebRTC data channel (id 100, label reliable). All commands are little-endian, packed (no padding) C structs whose first byte is a CommandPayloadType (a uint8_t; reference enum: teleport::core::CommandPayloadType) discriminator. The complete set of values is in the table below. Coordinates and units are converted on the server to the client’s AxesStandard before sending.
Any command described on this page MAY instead be delivered as a binary frame on the signaling WebSocket — the payload bytes are identical, and the server uses this fallback transport whenever the WebRTC reliable data channel is not yet open (notably for SetupCommand). Receivers MUST accept commands on either transport for the lifetime of the session; see Reliable-channel transport fallback (binary WebSocket frames).
The complete set of command types is enumerated below. Variable-length commands declare the count of the trailing array(s) inside the struct; the receiver reads sizeof(StructType) bytes followed by the trailing data.
Id |
Name |
Reference struct |
Trailing data |
|---|---|---|---|
0 |
|
(never sent) |
|
1 |
|
|
none |
2 |
|
|
none (154 bytes; see Data Service) |
3 |
|
|
|
4 |
|
|
none (carries a fresh |
5 |
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
none |
9 |
|
|
none (embeds |
10 |
|
(reserved) |
reserved |
11 |
|
|
none |
12 |
|
|
|
13 |
|
|
none |
14 |
|
|
|
15 |
|
|
|
16 |
|
|
none (sent over the unreliable channel; client replies with PongForLatency) |
17 |
|
|
|
18 |
|
|
|
128 |
|
|
none (acked; see |
2.4.6.1.1. Acknowledged commands¶
Commands derived from AckedCommand (reference: teleport::core::AckedCommand; currently SetupLighting and SetOriginNode) carry an additional uint64_t ack_id field after the 1-byte type. The client must reply with an AcknowledgementMessage containing the same ack_id. ack_id increases monotonically per session; clients can ignore any id less than or equal to one already received.
2.4.6.1.2. Selected command layouts¶
Bytes |
Type |
Description |
|---|---|---|
1 |
CommandPayloadType |
|
Bytes |
Type |
Description |
|---|---|---|
1 |
CommandPayloadType |
|
89 |
avs::VideoConfig |
New video configuration (same layout as inside |
Bytes |
Type |
Description |
|---|---|---|
1 |
CommandPayloadType |
|
8 |
size_t |
|
8 |
size_t |
|
8 * S |
uid[] |
Nodes to show. |
8 * H |
uid[] |
Nodes to hide. |
Bytes |
Type |
Description |
|---|---|---|
1 |
CommandPayloadType |
|
8 |
size_t |
|
N * sizeof(MovementUpdate) |
MovementUpdate[] |
Per-node motion updates. |
Bytes |
Type |
Description |
|---|---|---|
1 |
CommandPayloadType |
|
8 |
uid |
|
1 |
bool |
|
Bytes |
Type |
Description |
|---|---|---|
1 |
CommandPayloadType |
|
4 |
int32 |
|
8 |
int64 |
|
8 |
uid |
|
8 |
uid |
|
8 |
uid |
|
4 |
float |
|
4 |
float |
|
1 |
bool |
|
Bytes |
Type |
Description |
|---|---|---|
1 |
CommandPayloadType |
|
8 |
uid |
|
8 |
uid |
|
4 |
float |
|
Bytes |
Type |
Description |
|---|---|---|
1 |
CommandPayloadType |
|
8 |
uint64 |
|
57 |
ClientDynamicLighting |
Dynamic lighting parameters (specular/diffuse/light positions, sizes, mips, mode, two cubemap uids; reference: |
Bytes |
Type |
Description |
|---|---|---|
1 |
CommandPayloadType |
|
8 |
uid |
|
8 |
uint64 |
|
8 |
uid |
|
28 |
Pose_packed |
|
Bytes |
Type |
Description |
|---|---|---|
1 |
CommandPayloadType |
|
8 |
uid |
|
2 |
uint16 |
|
P |
char[] |
UTF-8 regular expression matching a client-side OpenXR pose path. If |
Bytes |
Type |
Description |
|---|---|---|
1 |
CommandPayloadType |
|
2 |
uint16 |
|
I × variable |
InputDefinitionNetPacket[] |
Each definition is 5 bytes ( |
Bytes |
Type |
Description |
|---|---|---|
1 |
CommandPayloadType |
|
8 |
int64 |
|
Bytes |
Type |
Description |
|---|---|---|
1 |
CommandPayloadType |
|
8 |
uint64 |
|
8 |
uid |
|
8 |
uint64 |
|