magic-wormhole-0.2.0: Interact with Magic Wormhole

Safe HaskellSafe
LanguageHaskell2010

MagicWormhole.Internal.WebSockets

Description

Help interaction with websockets.

Synopsis

Documentation

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