blob: e712622edb35dbc6f36002d3575c9ab3638c022b [file] [log] [blame]
Alex Perryb3b50792020-01-18 16:13:45 -08001namespace aos.web_proxy;
2
3// SDP is Session Description Protocol. We only handle OFFER (starting a
4// transaction) and ANSWER responding to an offer.
5enum SdpType : byte {
6 OFFER,
7 ANSWER
8}
9
10// The SDP payload is an opaque string that describes what (media/data) we
11// want to transmit.
12table WebSocketSdp {
13 type:SdpType;
14 payload:string;
15}
16
17// ICE is way for different peers to learn how to connect to each other.
18// Because we will only be running in a local network, we don't have to support
19// advaced features.
20table WebSocketIce {
21 candidate:string;
22 sdpMid:string;
23 sdpMLineIndex:int;
24}
25
26union Payload {WebSocketSdp, WebSocketIce}
27
28// We only send a single type of message on the websocket to simplify parsing.
29table WebSocketMessage {
30 payload:Payload;
31}