Expose the most-used functions from WebSocketFramework.ServerInterface
.
makeServer : (Json.Decode.Value -> Platform.Cmd.Cmd msg) -> Types.MessageEncoder message -> Types.ServerUrl -> msg -> Types.ServerInterface gamestate player message msg
Make a client connection to a real WebSocket server.
The msg
will usually be a no-operation message. It is only used to fill a slot in the returned ServerInterface
. That slot is only used by the proxy server.
makeProxyServer : Types.ServerMessageProcessor gamestate player message -> (Types.ServerInterface gamestate player message msg -> message -> msg) -> Types.ServerInterface gamestate player message msg
Make a client connection to a proxy server.
No WebSocket connection will be used to send messages.
decodePlist : Json.Decode.Decoder message -> Types.Plist -> Result String message
Decode a list of key/value pairs into a message.
send : Types.ServerInterface gamestate player message msg -> message -> Platform.Cmd.Cmd msg
Return a Cmd
to send a message through a server interface.
unknownMessage : Types.ReqRsp -> Result String message
Return an Err
reporting on an unknown message name.