signaling

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2020 License: GPL-3.0 Imports: 8 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 {
	Metadata   models.Metadata
	Addr       string
	Connection *websocket.Conn
	Chans      map[string]chan string
	SignalChan chan models.Signal
}

Client connects to the server websockets and authenticates

func (*Client) Close

func (c *Client) Close()

Close disconnects cleanly

func (*Client) Init

func (c *Client) Init(metadata models.Metadata) error

Init will authenticate with the signalling server

func (*Client) Listen

func (c *Client) Listen()

Listen gets and processes all the messages

func (*Client) Push

func (c *Client) Push(msg string) error

Push sends a message on the socket

Jump to

Keyboard shortcuts

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