Media/WebRTC/WebRTCE10S/NetworkProxyInterface: Difference between revisions
< Media | WebRTC | WebRTCE10S
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
==== Address Enumeration ==== | ==== Address Enumeration ==== | ||
This should be an RPC-style call. | |||
nsresult EnumerateInterfaces(std::vector<Interface>* interfaces); | |||
Returns a sequence of: | Returns a sequence of: | ||
struct Interface { | |||
string name; | string name; | ||
PRNetAddr address; | PRNetAddr address; | ||
Line 12: | Line 14: | ||
} | } | ||
enum InterfaceType { Local, Wired, WiFi, Mobile, Virtual }; | enum InterfaceType { Local, Wired, WiFi, Mobile, Virtual }; | ||
==== Socket Management ==== | ==== Socket Management ==== |
Revision as of 10:03, 24 April 2013
Network Proxy Interfaces for WebRTC E10S Split
Address Enumeration
This should be an RPC-style call.
nsresult EnumerateInterfaces(std::vector<Interface>* interfaces); Returns a sequence of:
struct Interface { string name; PRNetAddr address; InterfaceType type; } enum InterfaceType { Local, Wired, WiFi, Mobile, Virtual };
Socket Management
The following interfaces should be synchronous/RPC-style.
To create a socket:
nsresult SocketCreate(PRNetAddr* requested_address, SocketHandle* handle);
You pass in a PRNetAddr with an IP address but an empty (0) port. On success, the port is filled in, and the handle is valid.
To destroy a socket:
nsresult SocketDestroy(SocketHandle handle);
This effectively closes it.