NEXIS
Api reference

Message Catalog

Canonical message types, direction, payload shape, and channel intent.

Message Catalog

Legend:

  • Direction: C->S client to server, S->C server to client
  • Channel intent: reliable or unreliable logical priority

Handshake and session

TypeDirectionPurposePayload (p)Channel
handshakeC->SStart sessionhandshake object (v, codecs, project_id, token, optional session_id)reliable
handshake.okS->CHandshake accepted{ codec, session_id? }reliable
errorS->CError response{ reason: string }reliable

Room lifecycle

TypeDirectionPurposePayload (p)Channel
room.join_or_createC->SJoin existing room or create one{ room_type, room?, options? }reliable
room.leaveC->SLeave room{ room }reliable
room.listC->SList active rooms{ room_type? }reliable
rpc.responseS->CCorrelated response for RPC requests{ ok, ... }reliable

Room messaging

TypeDirectionPurposePayload (p)Channel
room.messageC->S and S->CCustom room message/event{ type: string, data: any }reliable or policy-based
room.message.bytesC->S and S->CCustom binary room message{ type: string, data_b64: string }reliable or policy-based

Notes:

  • Game-specific action type is p.type (example: player.move, shoot).
  • Plugin room logic reads this via input.type / input.data.

State sync

TypeDirectionPurposePayload (p)Channel
state.snapshotS->CFull authoritative room state{ state, seq, checksum? }reliable
state.patchS->CIncremental room state changes{ ops, seq, checksum? }reliable
state.ackC->SAcknowledge latest applied state seq{ room, seq, checksum? }reliable
state.resyncC->SRequest fresh snapshot{ room, reason? }reliable

Matchmaking

TypeDirectionPurposePayload (p)Channel
matchmaking.enqueueC->SQueue player for room type{ room_type, size }reliable
matchmaking.dequeueC->SRemove player from queue{ room_type? }reliable
match.foundS->CMatch created/assigned{ room, room_type, size, participants }reliable

Fast-path examples

Some high-frequency types may be routed with unreliable intent by policy (example categories):

  • position/aim/input delta updates

Use unreliable intent only for transient data that can be dropped safely.

Typed Message Dispatcher

('room.message');
('state.patch');

On this page