broadcast

package
v3.3.4+incompatible Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 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 WebsocketBroadcaster

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

WebsocketBroadcaster contains information on the websocket that we are communicating with

func New

func New(rchan <-chan []byte) *WebsocketBroadcaster

New creates a new WebsocketBroadcaster

func (*WebsocketBroadcaster) Add

func (w *WebsocketBroadcaster) Add(ws messageWriteCloser)

Add adds the websocket information to the WebsocketBroadcaser stuct

func (*WebsocketBroadcaster) Broadcast

func (w *WebsocketBroadcaster) Broadcast()

Broadcast sends data to the websocket

func (*WebsocketBroadcaster) Stop

func (w *WebsocketBroadcaster) Stop() chan struct{}

Stop handles closing the websocket.

Jump to

Keyboard shortcuts

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