Currently dplib hardcodes TCP/IP or libnice service provider addresses, which is a bit restrictive (although you're unlikely to use anything other than TCP/IP from the defaults, but who knows).
Idea:
Shorthands for common stuff:
DPAddress::ip("164.145.25.145"); // → tcp/ip address with a specific IP
DPAddress::ip(); // tcp/ip address with empty IP, for hosting sessions
Address builder for other stuff:
class DPAddress {
public:
DPAddress (GUID serviceProviderGuid);
DPAddress* add (GUID dataType, void* data, int dataSize);
DPAddress* add (GUID dataType, string str) {
return add(dataType, str.c_str(), str.length());
}
};
// tcp/ip address with an IP component
new DPAddress(DPSPGUID_TCPIP)
->add(DPAID_INet, "164.145.25.145");
// libnice service provider address with custom signaling and STUN servers, and a known host SDP
new DPAddress(DPSPGUID_NICE)
->add(DPAID_ICESignalingServer, "aocmultiny.net:7788")
->add(DPAID_ICETURN, "turn.l.google.com:6345")
->add(DPAID_ICESDP, hostSdp, hostSdpLen);
// or even, but not sure if this is doable with types and stuff:
new DPAddress(DPSPGUID_NICE, {
{ DPAID_ICESignalingServer, "aocmultiny.net:7788" },
{ DPAID_ICETURN, "turn.l.google.com:6345" },
{ DPAID_ICESDP, hostSdp, hostSdpLen },
});
Currently dplib hardcodes TCP/IP or libnice service provider addresses, which is a bit restrictive (although you're unlikely to use anything other than TCP/IP from the defaults, but who knows).
Idea:
Shorthands for common stuff:
Address builder for other stuff: