socket

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TcpRelay

func TcpRelay(ws *websocket.Conn, rq *TcpRelayParam) error

Types

type TcpRelayParam

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

type WsConn

type WsConn struct {
	*websocket.Conn
}

func NewWsClient

func NewWsClient(u, p, o string) (*WsConn, error)

func NewWsConn

func NewWsConn(ws *websocket.Conn) *WsConn

func (*WsConn) Close

func (pod *WsConn) Close() error

func (*WsConn) Die

func (pod *WsConn) Die(r string)

func (*WsConn) Read

func (pod *WsConn) Read(v []byte) error

func (*WsConn) ReadJson

func (pod *WsConn) ReadJson(v any) error

func (*WsConn) Write

func (pod *WsConn) Write(p []byte) error

func (*WsConn) WriteJson

func (pod *WsConn) WriteJson(v any) error

Jump to

Keyboard shortcuts

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