Documentation
¶
Index ¶
Constants ¶
View Source
const MAX_BUF_SIZE = 1024 * 1024 * 8
Variables ¶
View Source
var UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"
Functions ¶
func MakeTransport ¶
func MakeTransport(conn WSConn) io.ReadWriteCloser
MakeTransport wraps a websocket connection to a io.ReadWriteCloser by making use of only binary type frames.
Types ¶
type WSConn ¶
func Dial ¶
Dial is to initiate a websocket connection. Dial accepts an URL argument like `wss://localhost:3243/hi`.
func WebSocketHandshake ¶
WebSocketHandshake works at server-side. It hijacks the connection and continues with handshaking, after that it returns a closable frame read-writer.
Click to show internal directories.
Click to hide internal directories.