websocket

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func (*Client) ID

func (c *Client) ID() uint64

func (*Client) OnMessage

func (c *Client) OnMessage(fn func(isBinary bool, data []byte, w *Writer))

func (*Client) Write

func (c *Client) Write(data []byte) (int, error)

type Server

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

func NewServer

func NewServer() *Server

func (*Server) OnAccept

func (s *Server) OnAccept(fn func(client *Client))

func (*Server) Upgrade

func (s *Server) Upgrade(ctx *fasthttp.RequestCtx)

type Writer

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

func (*Writer) Close

func (w *Writer) Close() error

func (*Writer) Write

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

Jump to

Keyboard shortcuts

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