Extended STUN server URL parsing to TURN server URLs

This commit is contained in:
Paul-Louis Ageneau
2019-12-25 16:07:01 +01:00
parent e11de119be
commit a683b76a21
5 changed files with 59 additions and 29 deletions

View File

@ -30,7 +30,7 @@ struct IceServer {
enum class Type { Stun, Turn };
enum class RelayType { TurnUdp, TurnTcp, TurnTls };
IceServer(const string &host_);
IceServer(const string &url);
// STUN
IceServer(string hostname_, uint16_t port_);
@ -38,9 +38,9 @@ struct IceServer {
// TURN
IceServer(string hostname_, uint16_t port, string username_, string password_,
RelayType relayType_);
RelayType relayType_ = RelayType::TurnUdp);
IceServer(string hostname_, string service_, string username_, string password_,
RelayType relayType_);
RelayType relayType_ = RelayType::TurnUdp);
string hostname;
string service;