[{"name":"WebSocket","comment":" WebSocket.\n\nThis WebSocket Elm module lets you encode and decode messages to pass to javascript,\nwhere the actual websocket sending and receiving will take place. See the README for more.\n\n@docs WebSocketCmd\n@docs WebSocketMsg\n@docs decodeMsg\n@docs encodeCmd\n@docs receive\n@docs send\n\n","unions":[{"name":"WebSocketCmd","comment":" messages going out from Elm to be processed in javascript.\nname: You should give each websocket connection a unique name.\naddress: is the websocket address, for instance \"<ws://127.0.0.1:9000\">.\nprotocol: is an extra string to help the server know what kind of data to expect, like\nif your server handled json or binary data. Probably you can pass it \"\".\n","args":[],"cases":[["Connect",["{ name : String.String, address : String.String, protocol : String.String }"]],["Send",["{ name : String.String, content : String.String }"]],["Close",["{ name : String.String }"]]]},{"name":"WebSocketMsg","comment":" responses from javascript after websocket operations.\nThe name is the one you have the socket in Connect.\n","args":[],"cases":[["Error",["{ name : String.String, error : String.String }"]],["Data",["{ name : String.String, data : String.String }"]]]}],"aliases":[],"values":[{"name":"decodeMsg","comment":" decode incoming messages from the websocket javascript.\n","type":"Json.Decode.Decoder WebSocket.WebSocketMsg"},{"name":"encodeCmd","comment":" encode websocket commands into json.\n","type":"WebSocket.WebSocketCmd -> Json.Encode.Value"},{"name":"receive","comment":" make a subscription function with receive and a port, like so:\n\n      port receiveSocketMsg : (JD.Value -> msg) -> Sub msg\n\n      wsreceive =\n          receiveSocketMsg <| WebSocket.receive WsMsg\n\nWhere WsMessage is defined in your app like this:\n\n      type Msg\n          = WsMsg (Result JD.Error WebSocket.WebSocketMsg)\n          | <other message types>\n\nthen in your application subscriptions:\n\n      subscriptions =\n          \\_ -> wsreceive\n\n","type":"(Result.Result Json.Decode.Error WebSocket.WebSocketMsg -> msg) -> Json.Decode.Value -> msg"},{"name":"send","comment":" use send to make a websocket convenience function,\nlike so:\n\n      port sendSocketCommand : JE.Value -> Cmd msg\n\n      wssend =\n          WebSocket.send sendSocketCommand\n\nthen you can call (makes a Cmd):\n\n      wssend <|\n          WebSocket.Send\n              { name = \"touchpage\"\n              , content = dta\n              }\n\n","type":"(Json.Encode.Value -> Platform.Cmd.Cmd msg) -> WebSocket.WebSocketCmd -> Platform.Cmd.Cmd msg"}],"binops":[]}]