xws

package
v0.0.0-...-74ea078 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

Reader 是对 gobwas/ws 的封装,用于读取 WebSocket 消息。

func NewClientSideReader

func NewClientSideReader(conn net.Conn) *Reader

func NewServerSideReader

func NewServerSideReader(conn net.Conn) *Reader

func (*Reader) Read

func (r *Reader) Read() ([]byte, error)

type Writer

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

Writer 是对 gobwas/ws 的封装,用于写入 WebSocket 消息。

func NewServerSideWriter

func NewServerSideWriter(dst io.Writer, compressed bool) *Writer

func (*Writer) Write

func (w *Writer) Write(payload []byte) (int, error)

Jump to

Keyboard shortcuts

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