ws

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 12 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
}

type WebsocketsServer

type WebsocketsServer struct {
	EventQueue *chan *collections.Event
	// contains filtered or unexported fields
}

func New

func New(listenHost string, listenPort uint, eventQueue *chan *collections.Event) *WebsocketsServer

func (*WebsocketsServer) ClientsConnected

func (s *WebsocketsServer) ClientsConnected() int

func (*WebsocketsServer) Register

func (s *WebsocketsServer) Register(conn net.Conn) *Client

func (*WebsocketsServer) Remove

func (s *WebsocketsServer) Remove(client *Client)

Remove removes user from chat.

func (*WebsocketsServer) Start

func (s *WebsocketsServer) Start()

Jump to

Keyboard shortcuts

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