kageurufu / elm-websockets / Websockets.Command

Commands for interacting with Websockets


type Command
    = Open String String Websockets.Meta.Meta
    | Close String
    | Send String Json.Encode.Value

Type for wrapping Commands before JSON encoding

open : String -> String -> List ( String, String ) -> Json.Encode.Value

JSON Encode a Open command for sending through the Command Port

send : String -> Json.Encode.Value -> Json.Encode.Value

JSON Encode a Send command for sending through the Command Port

close : String -> Json.Encode.Value

JSON Encode a Close command for sending through the Command Port