websocket

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(protocol, host string, port int, path string) (*websocket.Conn, error)

Types

type WebSocket

type WebSocket struct {
	// contains filtered or unexported fields
}

func NewWebSocket

func NewWebSocket(fd int, conn *websocket.Conn) *WebSocket

func (*WebSocket) Close

func (t *WebSocket) Close() error

func (*WebSocket) Closed

func (t *WebSocket) Closed() bool

func (*WebSocket) FD

func (t *WebSocket) FD() int

func (*WebSocket) RQueue

func (t *WebSocket) RQueue() chan connection.IPacket

func (*WebSocket) Read

func (t *WebSocket) Read(hLen, bLen, bLenOffset int) ([]byte, error)

func (*WebSocket) Send added in v0.0.2

func (t *WebSocket) Send(pack connection.IPacket) error

func (*WebSocket) SendBytes added in v0.0.5

func (t *WebSocket) SendBytes(buf []byte) error

func (*WebSocket) WQueue

func (t *WebSocket) WQueue() chan []byte

func (*WebSocket) Write

func (t *WebSocket) Write(pack []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL