websocket

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWebSocketClient

func NewWebSocketClient(log *slog.Logger, peer domain.Peer, sStorage sessionstorage.SessionStorage) client.Client

func NewWebSocketSession

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

Types

type WebSocketClient

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

func (*WebSocketClient) Connect

func (c *WebSocketClient) Connect(ctx context.Context, peer *domain.Peer) (session.Session, error)

type WebSocketSession

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

func (*WebSocketSession) Close

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

func (*WebSocketSession) GetID

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

func (*WebSocketSession) GetLastDial

func (s *WebSocketSession) GetLastDial() time.Time

func (*WebSocketSession) GetPeerID

func (s *WebSocketSession) GetPeerID() 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

Jump to

Keyboard shortcuts

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