magic-wormhole-0.3.3: Interact with Magic Wormhole

Safe HaskellSafe
LanguageHaskell2010

MagicWormhole.Internal.WebSockets

Description

Help interaction with websockets.

Synopsis

Documentation

data WebSocketEndpoint Source #

Endpoint for a websocket connection.

Construct directly or with parseWebSocketEndpoint.

Instances
Eq WebSocketEndpoint Source # 
Instance details

Defined in MagicWormhole.Internal.WebSockets

Show WebSocketEndpoint Source # 
Instance details

Defined in MagicWormhole.Internal.WebSockets

Methods

showsPrec :: Int -> WebSocketEndpoint -> ShowS

show :: WebSocketEndpoint -> String

showList :: [WebSocketEndpoint] -> ShowS

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.

type Hostname = String Source #

Host name for a websocket endpoint. e.g. example.com.

type Port = Int Source #

Port number for a websocket endpoint. e.g. 80

type Path = String Source #

Path to a websocket endpoint. e.g. /v1/foo