Documentation ¶
Index ¶
Constants ¶
View Source
const BinaryFormat = websocket.MessageBinary
View Source
const DefaultAcceptTimeout = 3 * time.Second
View Source
const TextFormat = websocket.MessageText
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Format ¶
type Format = websocket.MessageType
type Listener ¶
type Listener struct { AcceptTimeout time.Duration // respond to HTTP requests if Accept not called. DefaultFormat Format // Default write format; initialized to binary. // contains filtered or unexported fields }
func ListenWS ¶
func ListenWS() *Listener
ListenWS returns a websocket listener; This satisfies net.Listener in order to Accept, and satisfies http.Handler to serve the websocket.
Click to show internal directories.
Click to hide internal directories.