websocket

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConnection

func CreateConnection(w http.ResponseWriter, r *http.Request) (*websocket.Conn, error)

Types

type Client

type Client struct {
	Conn *websocket.Conn
	Pool *Pool
}

func (*Client) Read

func (c *Client) Read(api plugin.API)

type Pool

type Pool struct {
	Register   chan *Client
	Unregister chan *Client
	Clients    map[*Client]bool
	Broadcast  chan *serializer.UserStatus
}

func NewPool

func NewPool() *Pool

func (*Pool) Start

func (p *Pool) Start(api plugin.API)

Jump to

Keyboard shortcuts

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