ICE Gather and Warmth policies

Here's my spaghetti on wall idea(s) to promote discussion in the hopes 
for finalizing the API...


Current gather policy is defined as:

````
enum RTCIceGatherPolicy {
     "all",
     "nohost",
     "relayonly"
};
````

I think I'd prefer a more granular control over what's going on although 
I don't know the best way to express in WebIDL, something akin to a bit 
field:

In C++ it would be something like:
````
enum RTCIceGatherPolicy {
   All = ..., // all listed without changing default prioritization

   Host = 0x00000001,
   ServerReflexive = 0x00000002,
   Relay = 0x00000004,
   PeerReflexive = 0x00000008,

   HostIpv4 = 0x00000100,
   HostIpv6 = 0x00000200,
   HostUdp = 0x00001000,
   RelayUdp = 0x00002000,
   HostTcp = 0x00004000,
   RelayTcp = 0x00008000,

   Lan = 0x00010000,
   WLan = 0x00020000,
   WWan = 0x00040000,
   Vpn = 0x00080000,

   // prioritization overrides / changes
   PrioritizeIpv4OverIpV6 = 0x01000000,
   PrioritizeTcpOverUdp = 0x02000000,
   PrioritizeRelayOverHost = 0x04000000,
};
````

Filed as: https://github.com/openpeer/ortc/issues/54


Plus we don't currently have a warmth but something is needed at minimal.

Scenario: Offer containing a list of candidates is given but before any 
(or all) answers arrive from the remote party, the candidates become 
stale due to inactivity and are no longer valid.

Scenario: Always want to keep a TCP relay connection open as a backup 
should local addresses become disconnected (e.g. backup wwan connection 
is alive but local wifi lan goes down).

I'm sure a ton of other scenarios can be dreamed up but we need 
something at minimal as a proposal.

(again, not sure how to express in WebIDL, but if it were C++)
````
enum WarmthPolicy {
   KeepWarmUntilIceCompleted = 0x00000001, // (default policy)

   AlwaysKeepServerReflexiveWarm = 0x00000010,
   AlwaysKeepRelayUdpWarm = 0x00000020,
   AlwaysKeepRelayTcpWarm = 0x00000040,

   AlwaysKeepWLanWarm = 0x00001000,
   AlwaysKeepWWanWarm = 0x00002000,
   AlwaysKeepVpnWarm = 0x00004000
};
````

We can add a simple: setWarmthPolicy(...) onto the API and the gather 
policy can be set as part of the call to the gather method.

Filed as: https://github.com/openpeer/ortc/issues/55

Received on Saturday, 12 April 2014 21:39:07 UTC