hub

package
v0.0.0-...-d4bae03 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2019 License: MIT Imports: 3 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
}

Hub maintains the set of active clients

func NewHub

func NewHub(log *logger.Log) *Hub

func (*Hub) AddRequest

func (h *Hub) AddRequest(to string, request []byte)

func (*Hub) Connected

func (h *Hub) Connected(who string) bool

func (*Hub) GetConn

func (h *Hub) GetConn(user string) (*websocket.Conn, error)

func (*Hub) Register

func (h *Hub) Register(c *websocket.Conn, name string)

func (*Hub) Run

func (h *Hub) Run()

func (*Hub) Unregister

func (h *Hub) Unregister(c *websocket.Conn, name string)

Jump to

Keyboard shortcuts

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