| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
LibP2P.Transport.WebSocket
Description
WebSocket transport over TCP and TLS.
Each WebSocket connection exposes an ordered byte stream to the standard libp2p security and muxer upgrade pipeline. Only binary WebSocket messages are accepted; message boundaries are hidden from stream consumers.
Documentation
data WebSocketConfig Source #
Outer TLS settings for secure WebSockets.
The default client parameters use the system CA store and normal hostname verification. A WSS listener is disabled until server parameters containing a certificate are supplied explicitly.
Constructors
| WebSocketConfig | |
Fields | |
defaultWebSocketConfig :: IO WebSocketConfig Source #
Secure defaults for WebSocket dialing. WSS listening remains disabled
until webSocketServerTLSParams is configured.
webSocketServerParams :: Credential -> ServerParams Source #
Build ordinary Web-PKI server parameters from a configured credential.
newWebSocketTransport :: IO Transport Source #
Create a WebSocket transport with secure client defaults.
newWebSocketTransportWithConfig :: WebSocketConfig -> IO Transport Source #
Create a WebSocket transport using explicit outer TLS settings.
canDialWebSocket :: Multiaddr -> Bool Source #
Recognize IP or DNS TCP addresses ending in ws or wss, with an optional trailing /p2p component.