package
Version:
v0.0.11
Opens a new window with list of versions in this module.
Published: Aug 1, 2024
License: CC0-1.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
View Source
var (
WS = B("ws://")
WSS = B("wss://")
HTTP = B("http://")
HTTPS = B("https://")
)
Reason constructs a properly formatted message with a machine readable prefix for OK and CLOSED envelopes.
URL normalizes the URL
- Adds wss:// to addresses without a port, or with 443 that have no protocol
prefix
- Adds ws:// to addresses with any other port
- Converts http/s to ws/s
Source Files
¶
Click to show internal directories.
Click to hide internal directories.