Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn interface { // ReadJSON reads the next JSON-encoded message from the connection and // stores it in the value pointed to by v. ReadJSON(v interface{}) error // WriteJSON writes the JSON encoding of v as a message. WriteJSON(v interface{}) error // 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) // Error writes an error response including the given operation and error // message. The error is also returned. Error(op apiparams.Operation, err error) error // OK writes a success response with the given operation and formatted text // as a message. OK(op apiparams.Operation, format string, a ...interface{}) error // Close closes the WebSocket connection. Close() error }
Conn describes a WebSocket connection.
Click to show internal directories.
Click to hide internal directories.