Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conn ¶
type Conn interface { // NextReader returns the next data message received from the peer. The // returned messageType is either TextMessage or BinaryMessage. NextReader() (messageType int, r io.Reader, err error) // NextWriter returns a writer for the next message to send. The writer's // Close method flushes the complete message to the network. NextWriter(messageType int) (io.WriteCloser, error) }
Conn is a WebSocket connection that can be managed through data message readers and writers.
func NewConnWithHooks ¶
NewConnWithHooks creates and returns a new connection that executes the given onInput function every time data is received.
Click to show internal directories.
Click to hide internal directories.