billstclair/elm-websocket-framework/11.0.2

NOTE: this package is not compatible with Elm 0.19.1

WebSocketFramework

Expose the most-used functions from WebSocketFramework.ServerInterface.

Constructors

MessageEncoder message
-> ServerUrl
-> msg
-> 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.

ServerMessageProcessor gamestate player message
-> (ServerInterface gamestate player message msg -> message -> msg)
-> ServerInterface gamestate player message msg

Make a client connection to a proxy server.

No WebSocket connection will be used to send messages.

Functions

decodePlist : Decoder message -> Plist -> Result String message

Decode a list of key/value pairs into a message.

send : ServerInterface gamestate player message msg -> message -> Cmd msg

Return a Cmd to send a message through a server interface.

unknownMessage : ReqRsp -> Result String message

Return an Err reporting on an unknown message name.