Expand description
Steam server query (A2S) over UDP: request parsing, the challenge exchange, encoding and decoding of A2S_INFO, A2S_PLAYER and A2S_RULES, and Source split packets.
Structs§
- Reassembly
- Reassembly of split packets on the client side.
Enums§
Constants§
- INFO_
QUERY - MAX_
PACKET - Largest datagram either side sends, as Source servers use.
- MAX_
REQUEST - Largest request the server accepts.
- MAX_
RESPONSE - Largest logical response either side builds or reassembles.
- MAX_
SPLIT_ PACKETS - Split packets one response may span.
- NO_
CHALLENGE - The challenge a client sends to ask for one.
- REPLY_
TIMEOUT - How long a client waits for each reply datagram.
- REQUEST_
INFO - REQUEST_
PLAYERS - REQUEST_
RULES - RESPONSE_
CHALLENGE - RESPONSE_
INFO - RESPONSE_
PLAYERS - RESPONSE_
RULES - SINGLE
- SPLIT
- SPLIT_
CHUNK - Payload bytes per split packet, and the size field Source servers put in it.
Functions§
- decode_
response - Decode a complete response payload (after reassembly) into event data.
- encode_
challenge - encode_
info - A2S_INFO payload from a handler’s
a2s_infoanswer (Source format, protocol 17). - encode_
players - A2S_PLAYER payload: index, name, score (i32) and duration (f32 seconds) per player.
- encode_
request - encode_
rules - A2S_RULES payload: a count and name/value string pairs, in the handler’s order.
- packetize
- Split a logical response into datagrams: one single packet, or Source split packets.
- parse_
request - A parsed request: what was asked and the challenge it carried, if any.