Documentation ¶
Index ¶
- Constants
- Variables
- func HandleCloseFrame(buf []byte) (int16, string, error)
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) LocalAddr() net.Addr
- func (c *Conn) Ping(message []byte) error
- func (c *Conn) Pong(message []byte) error
- func (c *Conn) Read() (messageType byte, message []byte, err error)
- func (c *Conn) ReadMessage() (messageType byte, message []byte, err error)
- func (c *Conn) RemoteAddr() net.Addr
- func (c *Conn) SetReadBuffer(bytes int) error
- func (c *Conn) SetReadDeadline(t time.Time) error
- func (c *Conn) SetWriteBuffer(bytes int) error
- func (c *Conn) SetWriteDeadline(t time.Time) error
- func (c *Conn) Write(message []byte, binary bool) error
- func (c *Conn) WriteBinary(message []byte) error
- func (c *Conn) WriteMessage(messageType byte, message []byte) error
- func (c *Conn) WriteString(message []byte) error
Constants ¶
Variables ¶
View Source
var ( ErrControlTooLong = errors.New("control message too long") ErrRSVNotSupport = errors.New("reserved bit not support") ErrPayloadError = errors.New("payload length error") ErrControlFragmented = errors.New("control message can not be fragmented") ErrNotTCPConn = errors.New("not a tcp connection") ErrWriteError = errors.New("write error") )
View Source
var ( ErrInvalidMethod = errors.New("Only GET Supported") ErrInvalidVersion = errors.New("Sec-Websocket-Version: 13") ErrInvalidUpgrade = errors.New("Can \"Upgrade\" only to \"WebSocket\"") ErrInvalidConnection = errors.New("\"Connection\" must be \"Upgrade\"") ErrMissingKey = errors.New("Missing Key") ErrHijacker = errors.New("Not implement http.Hijacker") ErrNoEmptyConn = errors.New("Conn ReadBuf must be empty") )
View Source
var (
ErrBadHandshake = errors.New("bad handshake")
)
Functions ¶
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) ReadMessage ¶
func (*Conn) RemoteAddr ¶
func (*Conn) SetReadBuffer ¶
func (*Conn) SetWriteBuffer ¶
func (*Conn) WriteString ¶
write utf-8 text message
Click to show internal directories.
Click to hide internal directories.