websocket

package
v0.0.0-...-3264219 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: MIT Imports: 9 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
}

Client represents a connection.

type Hub

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

Hub manages clients and rooms.

func (*Hub) HandleJoinRoom

func (h *Hub) HandleJoinRoom(client *Client, roomName string)

Handle join room.

func (*Hub) Run

func (h *Hub) Run()

Run starts the Hub.

type WebSocketServer

type WebSocketServer struct{}

WebSocketServer manages the WebSocket server.

func NewWebSocketServer

func NewWebSocketServer() *WebSocketServer

NewWebSocketServer creates a new server.

func (*WebSocketServer) NewWsServer

func (wss *WebSocketServer) NewWsServer(addr string)

NewWsServer starts the WebSocket server.

Jump to

Keyboard shortcuts

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