Types used by the rest of the WebSocketFramework modules.
Opaque type used to store game and player state.
Everything necessary to communicate with a server, be it real or proxy.
Information about a player in a game
If your server supports public games, this represents the game id and name of the creator of the game.
A list of pubic games.
Used to inform the server of added and removed games and players.
Interact with it via ServerInterface.addGame, addPlayer, removeGame, removePlayer.
Create a mostly empty ServerState.
You'll need to initialize the seed property in your real server,
if you use newGameid and newPlayerid in WebSocketFramework.ServerInterface.
An empty list of public games.
A raw request, ready to be encoded to go over the wire.
reqrsp is "req" or "rsp" for request or response.
msg is the name of the message.
plist is the parameters of the message.
A type safe representation of the reqrsp and msg fields of a RawMessage.
A list of key/value pairs.
An error response that encapsulates a request message and an error string.
Type signature of a function which turns a server state and a request message into a ServerState and maybe a response message.
Type signature of a function that extracts the game id from a message, if it has one.
Type signature of a function that checks if a message is a legal request for a gamestate.
An Err result has a message string. An Ok result maps an unusable value.
Type signature for a function that turns a request or response and a key/value list into a message.
Type signature for a function that turns a message into request or response and a key/value list.
Wrapping of encoder, decoder, and error message creator.
Map a list of request or response names to decoders for their messages.
Convert ASCII double-quote characters to curly end quotes.
The input port from the Node.js code to the WebSocket server.
The output port from the WebSocket server to the Node.js code.
The kind of error being reported in an Error instance.
Description of an error passed to EncodeDecode.errorWrapper.
If kind is JsonParseError, then description is the message text,
and message is the error returned from parsing it.
If kind is UnspecifiedError, then description is user-level text,
and message is Ok wrapped around the relevant message, if there
is one, or Err wrapped around some likely useless string.
An alias for String.
An alias for String.
An alias for String.
The part of the server state that is independent from its socket connections.
You will rarely access the three
Dicts directly. Instead, useaddGame,addPlayer,getGame,getPlayer,updateGame,updatePlayer,removeGame,removePlayerfromWebsocketFramework.ServerInterface.