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.
Click to show internal directories.
Click to hide internal directories.