rtc

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTimeout = errors.New("Peer connection timed out, this mostly happens when the other peer is down")

ErrTimeout is sent back after the RTCConnection times out

Functions

This section is empty.

Types

type Session

type Session struct {
	RemotePeer struct {
		PubKey   string
		NickName string
	}

	Listener *net.Listener
	*webrtc.PeerConnection
}

Session holds all the session information for a WebRTC session

func (*Session) Init

func (s *Session) Init(nickname string, st state.State, port int) error

Init initializes a WebRTC session as an offer

func (*Session) InitAnswer

func (s *Session) InitAnswer(signal models.Signal, push func(string), myKey string) error

InitAnswer initializes a WebRTC session as an answer

type Sessions

type Sessions struct {
	RTCSessions map[string]*Session
	PortMap     map[string]int
}

Sessions holds a map for open RTC sessions and the assigned ports

func (*Sessions) Init

func (s *Sessions) Init()

Init initializes the session maps with empty values

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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