Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Help interaction with websockets.
- data WebSocketEndpoint = WebSocketEndpoint Hostname Port Path
- parseWebSocketEndpoint :: String -> Maybe WebSocketEndpoint
- uriToWebSocketEndpoint :: URI -> Maybe WebSocketEndpoint
- type Hostname = String
- type Port = Int
- type Path = String
Documentation
data WebSocketEndpoint Source #
Endpoint for a websocket connection.
Construct directly or with parseWebSocketEndpoint
.
parseWebSocketEndpoint :: String -> Maybe WebSocketEndpoint Source #
Parse a WebSocketEndpoint
.
uriToWebSocketEndpoint :: URI -> Maybe WebSocketEndpoint Source #
Turn a URI
into a WebSocketEndpoint
, if we can.
Requires that the URI has an authority (i.e. host & port). Discards information from scheme, query, and fragment.