Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Help interaction with websockets.
Synopsis
- 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
.
Instances
Eq WebSocketEndpoint Source # | |
Defined in MagicWormhole.Internal.WebSockets (==) :: WebSocketEndpoint -> WebSocketEndpoint -> Bool # (/=) :: WebSocketEndpoint -> WebSocketEndpoint -> Bool # | |
Show WebSocketEndpoint Source # | |
Defined in MagicWormhole.Internal.WebSockets showsPrec :: Int -> WebSocketEndpoint -> ShowS # show :: WebSocketEndpoint -> String # showList :: [WebSocketEndpoint] -> ShowS # |
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.