Documentation
¶
Index ¶
- Constants
- Variables
- func HandshakeAccessKey(key string) string
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) DirectWrite(mtype int, data []byte) error
- func (c *Conn) LocalAddr() net.Addr
- func (c *Conn) NextReader(msg *Reader) error
- func (c *Conn) NextWriter(ft int, msg *Writer)
- func (c *Conn) RemoteAddr() net.Addr
- func (c *Conn) WriteClose(code int, payload string) error
- func (c *Conn) WriteControl(mtype int, data []byte) error
- type Reader
- type Writer
Constants ¶
View Source
const ( TextMessage = 1 BinaryMessage = 2 CloseMessage = 8 PingMessage = 9 PongMessage = 10 ContinueFrame = 0 )
View Source
const ( CloseNormalClosure = 1000 CloseGoingAway = 1001 CloseProtocolError = 1002 CloseUnsupportedData = 1003 CloseNoStatusReceived = 1005 CloseAbnormalClosure = 1006 CloseInvalidFramePayloadData = 1007 ClosePolicyViolation = 1008 CloseMessageTooBig = 1009 CloseMandatoryExtension = 1010 CloseInternalServerErr = 1011 CloseServiceRestart = 1012 CloseTryAgainLater = 1013 CloseTLSHandshake = 1015 )
Variables ¶
View Source
var ErrClosed = errors.New("websocket: write closed")
View Source
var ErrFrame = errors.New("websocket: invalid frame")
View Source
var ErrRead = errors.New("websocket: invalid read")
Functions ¶
func HandshakeAccessKey ¶
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func WsUpgrader ¶
func (*Conn) NextReader ¶
func (*Conn) NextWriter ¶
func (*Conn) RemoteAddr ¶
Click to show internal directories.
Click to hide internal directories.