瀏覽代碼

Added STUN server to TURN test

Paul-Louis Ageneau 4 年之前
父節點
當前提交
7981fed7f4
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. 6 3
      test/turn_connectivity.cpp

+ 6 - 3
test/turn_connectivity.cpp

@@ -33,6 +33,9 @@ void test_turn_connectivity() {
 	InitLogger(LogLevel::Debug);
 	InitLogger(LogLevel::Debug);
 
 
 	Configuration config1;
 	Configuration config1;
+	// STUN server example (not necessary, just here for testing)
+	// Please do not use outside of libdatachannel tests
+	config1.iceServers.emplace_back("stun:stun.ageneau.net:3478");
 	// TURN server example
 	// TURN server example
 	// Please do not use outside of libdatachannel tests
 	// Please do not use outside of libdatachannel tests
 	config1.iceServers.emplace_back("turn:datachannel_test:[email protected]:3478");
 	config1.iceServers.emplace_back("turn:datachannel_test:[email protected]:3478");
@@ -40,12 +43,12 @@ void test_turn_connectivity() {
 	auto pc1 = std::make_shared<PeerConnection>(config1);
 	auto pc1 = std::make_shared<PeerConnection>(config1);
 
 
 	Configuration config2;
 	Configuration config2;
+	// STUN server example (not necessary, just here for testing)
+	// Please do not use outside of libdatachannel tests
+	config1.iceServers.emplace_back("stun:stun.ageneau.net:3478");
 	// TURN server example
 	// TURN server example
 	// Please do not use outside of libdatachannel tests
 	// Please do not use outside of libdatachannel tests
 	config2.iceServers.emplace_back("turn:datachannel_test:[email protected]:3478");
 	config2.iceServers.emplace_back("turn:datachannel_test:[email protected]:3478");
-	// Port range example
-	config2.portRangeBegin = 5000;
-	config2.portRangeEnd = 6000;
 
 
 	auto pc2 = std::make_shared<PeerConnection>(config2);
 	auto pc2 = std::make_shared<PeerConnection>(config2);