proto

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package proto contains shared messages for webrtc handshakes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptICECandidate

func AcceptICECandidate(conn *webrtc.PeerConnection, m *Message) error

AcceptICECandidate adds the candidate to the connection.

func ProxyICECandidates

func ProxyICECandidates(conn *webrtc.PeerConnection, w io.Writer) func()

ProxyICECandidates sends all ICE candidates using the message protocol to the writer provided.

func WriteError

func WriteError(w http.ResponseWriter, status int, err error)

WriteError responds with an error and status code.

Types

type Message

type Message struct {
	Error     string                     `json:"error"`
	Candidate string                     `json:"candidate"`
	Offer     *webrtc.SessionDescription `json:"offer"`
	Answer    *webrtc.SessionDescription `json:"answer"`
}

Message is a common format for agent and client to use in handshake.

Jump to

Keyboard shortcuts

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