websocket

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: MIT Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWebSocketServer

func NewWebSocketServer(port int, sessionsStorage sessionstorage.SessionStorage) server.Server

func NewWebSocketSession

func NewWebSocketSession(conn *websocket.Conn, peer *domain.Peer, incoming bool, lastDial time.Time) session.Session

Types

type WebSocketServer

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

func (*WebSocketServer) Serve

func (s *WebSocketServer) Serve() error

func (*WebSocketServer) Stop

func (s *WebSocketServer) Stop(ctx context.Context)

type WebSocketSession

type WebSocketSession struct {
	session.BaseSession
	// contains filtered or unexported fields
}

func (*WebSocketSession) Close

func (s *WebSocketSession) Close(ctx context.Context)

func (*WebSocketSession) GetID

func (s *WebSocketSession) GetID() uuid.UUID

func (*WebSocketSession) GetReadChannel

func (s *WebSocketSession) GetReadChannel(context.Context) (chan *pb.Message, error)

func (*WebSocketSession) GetWriteChannel

func (s *WebSocketSession) GetWriteChannel(context.Context) (chan *pb.Message, error)

func (*WebSocketSession) IsIncoming

func (s *WebSocketSession) IsIncoming() bool

func (*WebSocketSession) IsOpen

func (s *WebSocketSession) IsOpen() bool

func (*WebSocketSession) Read

func (s *WebSocketSession) Read(ctx context.Context)

func (*WebSocketSession) Write

func (s *WebSocketSession) Write(ctx context.Context)

Jump to

Keyboard shortcuts

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