websocket

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 4 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 uint64, conn *websocket.Conn) *WebSocket

func (*WebSocket) Close

func (t *WebSocket) Close() error

func (*WebSocket) Closed

func (t *WebSocket) Closed() bool

func (*WebSocket) Expired added in v1.0.2

func (t *WebSocket) Expired() bool

func (*WebSocket) FD

func (t *WebSocket) FD() uint64

func (*WebSocket) Get added in v1.0.5

func (t *WebSocket) Get(key int64) (any, bool)

func (*WebSocket) Read

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

func (*WebSocket) RemoteIp added in v0.1.2

func (t *WebSocket) RemoteIp() string

func (*WebSocket) SQueue added in v1.0.6

func (t *WebSocket) SQueue() <-chan bool

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) Set added in v1.0.5

func (t *WebSocket) Set(key int64, val any)

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