Documentation
¶
Overview ¶
Package wasm implements the browser side of livepage over the page's own WebSocket. Text frames keep being handled by livepage's JS client, while binary frames are multiplexed into numbered streams (Mux.Open) for protocols like aRPC.
Index ¶
Constants ¶
const ( // GlobalName is the JS object of the livepage client. GlobalName = "livepage" // EventClose is dispatched by the JS client when the socket closes. EventClose = "livepage:close" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mux ¶
type Mux struct {
// contains filtered or unexported fields
}
Mux multiplexes binary frames into numbered streams.
func Dial ¶
Dial returns a multiplexer of the binary WebSocket frames of the page. Closing it doesn't close the page WebSocket.