Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Frame ¶ added in v0.2.9
type Frame struct { Header FrameHeader Data io.Reader }
type FrameHeader ¶ added in v0.2.9
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.2.9
func (h FrameHeader) Length() int
func (*FrameHeader) ReadFrom ¶ added in v0.2.9
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) xnet.ClientAddr }
func Conn ¶
func Conn(conn *websocket.Conn) WebsocketConn
func ConnWithClientAddr ¶ added in v0.2.6
func ConnWithClientAddr(conn *websocket.Conn, clientAddr net.Addr) WebsocketConn
Click to show internal directories.
Click to hide internal directories.