Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Frame ¶ added in v0.0.3
type Frame struct {
Header FrameHeader
Data io.Reader
}
type FrameHeader ¶ added in v0.0.3
type FrameHeader struct {
Fin bool
Rsv1 bool
Rsv2 bool
Rsv3 bool
OpCode OpCode
PayloadLength int64
Masked bool
MaskKey uint32
}
FrameHeader represents a WebSocket frame header. See https://tools.ietf.org/html/rfc6455#section-5.2.
func (FrameHeader) Length ¶ added in v0.0.3
func (h FrameHeader) Length() int
func (*FrameHeader) ReadFrom ¶ added in v0.0.3
func (h *FrameHeader) ReadFrom(r io.Reader) (n int64, err error)
ReadFrom reads a header from the reader. See https://tools.ietf.org/html/rfc6455#section-5.2.
type WebsocketConn ¶
type WebsocketConn interface {
net.Conn
WriteMessage(int, []byte) error
ReadMessage() (int, []byte, error)
xio.CloseRead
xio.CloseWrite
}
func Conn ¶
func Conn(conn *websocket.Conn) WebsocketConn
func ContextConn ¶ added in v0.0.3
func ContextConn(ctx context.Context, conn *websocket.Conn) WebsocketConn
Click to show internal directories.
Click to hide internal directories.