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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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