Skip to main content

Module wire

Module wire 

Source
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§

Kind

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_info answer (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.