Documentation
¶
Index ¶
- Constants
- Variables
- func MathRandGen() int
- func MathRandLongTimeGen() time.Duration
- func MathRandShortTimeGen() time.Duration
- type Conn
- func (conn *Conn) Close() error
- func (conn *Conn) NextWriter(messageType int) (io.WriteCloser, error)
- func (conn *Conn) ReadMessage() (messageType int, p []byte, err error)
- func (conn *Conn) SetPongHandler(h func(appData string) error)
- func (conn *Conn) SetReadDeadline(t time.Time) error
- func (conn *Conn) SetReadLimit(limit int64)
- func (conn *Conn) SetWriteDeadline(t time.Time) error
- func (conn *Conn) WriteMessage(messageType int, data []byte) error
- type FakeWriter
Constants ¶
View Source
const ( // TextMessage denotes a text data message. The text message payload is // interpreted as UTF-8 encoded text data. TextMessage = 1 // BinaryMessage denotes a binary data message. BinaryMessage = 2 // CloseMessage denotes a close control message. The optional message // payload contains a numeric code and text. Use the FormatCloseMessage // function to format a close message payload. CloseMessage = 8 // PingMessage denotes a ping control message. The optional message payload // is UTF-8 encoded text. PingMessage = 9 // PongMessage denotes a pong control message. The optional message payload // is UTF-8 encoded text. PongMessage = 10 )
Variables ¶
View Source
var FakeError = errors.New("this is a fake error")
Functions ¶
func MathRandGen ¶
func MathRandGen() int
func MathRandLongTimeGen ¶
func MathRandShortTimeGen ¶
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) NextWriter ¶
func (conn *Conn) NextWriter(messageType int) (io.WriteCloser, error)
func (*Conn) SetPongHandler ¶
func (*Conn) SetReadLimit ¶
type FakeWriter ¶
type FakeWriter struct {
// contains filtered or unexported fields
}
func (*FakeWriter) Close ¶
func (fw *FakeWriter) Close() error
Click to show internal directories.
Click to hide internal directories.