lamdera/program-test/3.0.0

NOTE: the latest version is 4.0.0

A Lamdera package. It is not on package.elm-lang.org: the Lamdera compiler provides it, from static.lamdera.com, so lamdera install works and elm install does not.

Effect.Websocket

A websocket connection

= ConnectionClosed

Errors that might happen when sending data.

close : Connection -> Task restriction x ()

Close the websocket connection. This won't trigger any close notifications in listen.

createHandle : (Connection -> msg) -> String -> Command restriction toMsg msg

Create a websocket handle that you can then open by calling listen or sendString. Make sure to call close when you are finished with it.

-> (String -> msg)
-> ( { code : CloseEventCode
, reason : String
}
-> msg
)
-> Subscription restriction msg

Listen for incoming messages through a websocket connection. You'll also get notified if the connection closes unexpectedly (or in other words, you won't get notified if you're the one closing it with close).

sendString : Connection -> String -> Task restriction SendError ()

Send a string

= NormalClosure
| GoingAway
| ProtocolError
| UnsupportedData
| NoStatusReceived
| AbnormalClosure
| InvalidFramePayloadData
| PolicyViolation
| MessageTooBig
| MissingExtension
| InternalError
| ServiceRestart
| TryAgainLater
| BadGateway
| TlsHandshake
| UnknownCode Int

Here are some possible reasons that your websocket connection closed.

Internal function, please ignore

Internal function, please ignore