wshub

package
v0.0.0-...-9727b55 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 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 Hub

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

func NewHub

func NewHub(id string, ip string, rpcPort uint, repo repository.Repository) *Hub

func (*Hub) AddHubNode

func (h *Hub) AddHubNode(nodeId string, ip string, rpcPort uint) error

func (*Hub) AddWebSocketConnection

func (h *Hub) AddWebSocketConnection(wsConn *websocket.Conn, userId uuid.UUID)

func (*Hub) MessageToUser

func (h *Hub) MessageToUser(userId uuid.UUID, byteMsg []byte) error

type WsConnection

type WsConnection interface {
	SendMessage(msg []byte)
}

func NewConnection

func NewConnection(wsConn *websocket.Conn, unRegConnChan chan<- uuid.UUID) (WsConnection, uuid.UUID)

Directories

Path Synopsis
rpc

Jump to

Keyboard shortcuts

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