Logo FSBarV1_Archived

Protocol Module

Functions and values

Function or value Description

handshake stream

Full Usage: handshake stream

Parameters:
Returns: HandshakeInfo

Perform handshake with the proxy. Returns handshake info on success.

stream : NetworkStream
Returns: HandshakeInfo

receiveFrame stream

Full Usage: receiveFrame stream

Parameters:
Returns: GameFrame option

Receive one frame from the proxy. Returns Some frame for a normal Frame message. Also returns Some a synthetic terminal frame when the proxy delivers its standalone Shutdown envelope: the synthetic frame has FrameNumber = 0u and carries a single GameEvent.Shutdown event. Callers that need the last real game-frame number must rewrite the sentinel before dispatching. A clean socket close without a Shutdown envelope raises from the underlying read. See ../HighBarV2/specs/030-proxy-contract-docs/contracts/shutdown-wire-shape.md for the upstream wire-shape contract.

stream : NetworkStream
Returns: GameFrame option

replayBufferEnabled

Full Usage: replayBufferEnabled

Returns: bool

When false, sendCallback silently drops events from interleaved Frame messages (the pre-031 behaviour). When true, interleaved frames are stashed in a per-stream replay buffer and drained by the next receiveFrame on the same stream. Default false. Set to true by BarClient.Start() after warmup + unit-def loading completes so mid-game callback round-trips preserve engine events.

Returns: bool

sendCallback stream callbackId paramList

Full Usage: sendCallback stream callbackId paramList

Parameters:
Returns: CallbackResponse

Send a callback request and wait for the response.

stream : NetworkStream
callbackId : uint32
paramList : CallbackParam list
Returns: CallbackResponse

sendFrameResponse stream commands

Full Usage: sendFrameResponse stream commands

Parameters:

Send a frame response with commands.

stream : NetworkStream
commands : AICommand list

Type something to start searching.