signaler

package
v0.0.0-...-751b715 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Byebye

type Byebye struct {
	SessionID string `json:"session_id"`
	From      string `json:"from"`
}

type Error

type Error struct {
	Request string `json:"request"`
	Reason  string `json:"reason"`
}

type Method

type Method string
const (
	New       Method = "new"
	Bye       Method = "bye"
	Offer     Method = "offer"
	Answer    Method = "answer"
	Candidate Method = "candidate"
	Leave     Method = "leave"
	Keepalive Method = "keepalive"
)

type Negotiation

type Negotiation struct {
	From      string `json:"from"`
	To        string `json:"to"`
	SessionID string `json:"session_id"`
}

type Peer

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

Peer .

type PeerInfo

type PeerInfo struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	UserAgent string `json:"user_agent"`
}

type Request

type Request struct {
	Type Method      `json:"type"`
	Data interface{} `json:"data"`
}

type Session

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

Session info.

type Signaler

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

func NewSignaler

func NewSignaler(turn *turn.TurnServer) *Signaler

func (*Signaler) HandleNewWebSocket

func (s *Signaler) HandleNewWebSocket(conn *websocket.WebSocketConn, request *http.Request)

func (*Signaler) HandleTurnServerCredentials

func (s *Signaler) HandleTurnServerCredentials(writer http.ResponseWriter, request *http.Request)

HandleTurnServerCredentials . https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00

func (*Signaler) NotifyPeersUpdate

func (s *Signaler) NotifyPeersUpdate(conn *websocket.WebSocketConn, peers map[string]Peer)

NotifyPeersUpdate .

func (*Signaler) Send

func (s *Signaler) Send(conn *websocket.WebSocketConn, m interface{}) error

type TurnCredentials

type TurnCredentials struct {
	Username string   `json:"username"`
	Password string   `json:"password"`
	TTL      int      `json:"ttl"`
	Uris     []string `json:"uris"`
}

Jump to

Keyboard shortcuts

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