Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data WebSocket
- data WSEvent
- data WSState
- = Connecting
- | Open
- | Closing
- | Closed
- getWsUrl :: Fay Text
- onOpen :: WSEvent -> Fay ()
- onClose :: WebSocket -> Fay f -> Fay ()
- onError :: WebSocket -> Fay f -> Fay ()
- eventData :: WSEvent -> Fay Text
- onMessage :: WSEvent -> Fay ()
- websocket :: Text -> (WSEvent -> Fay ()) -> (WSEvent -> Fay ()) -> (WSEvent -> Fay ()) -> (WSEvent -> Fay ()) -> Fay WebSocket
- sendWS :: WebSocket -> Text -> Fay ()
- close :: WebSocket -> Fay ()
Documentation
:: Text | WebSocket endpoint URL; |
-> (WSEvent -> Fay ()) | when connection opened ; |
-> (WSEvent -> Fay ()) | when messages received; |
-> (WSEvent -> Fay ()) | when errors occured; |
-> (WSEvent -> Fay ()) | when connection closed. |
-> Fay WebSocket |
Key function that by given URL initialize connection, starts to listen all events and ready to sending data.