MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / encode_enum_request

Function encode_enum_request

mserver/Client/src/codec.rs:67–72  ·  view source on GitHub ↗

Build the 8-byte enumeration request. `magic_application` is the game's application id the server matches against before answering.

(magic_application: i32)

Source from the content-addressed store, hash-verified

65/// Build the 8-byte enumeration request. `magic_application` is the game's
66/// application id the server matches against before answering.
67pub fn encode_enum_request(magic_application: i32) -> [u8; 8] {
68 let mut out = [0u8; 8];
69 out[0..4].copy_from_slice(&MAGIC_ENUM_REQUEST.to_le_bytes());
70 out[4..8].copy_from_slice(&magic_application.to_le_bytes());
71 out
72}
73
74/// Parse a server-status response.
75///

Callers 2

query_serverFunction · 0.85

Calls

no outgoing calls

Tested by 1