Explorar o código

Added STUN server to test

Paul-Louis Ageneau %!s(int64=6) %!d(string=hai) anos
pai
achega
64e23341ad
Modificáronse 1 ficheiros con 5 adicións e 2 borrados
  1. 5 2
      test/main.cpp

+ 5 - 2
test/main.cpp

@@ -27,8 +27,11 @@ using namespace rtc;
 using namespace std;
 
 int main(int argc, char **argv) {
-	auto pc1 = std::make_shared<PeerConnection>();
-	auto pc2 = std::make_shared<PeerConnection>();
+	rtc::Configuration config;
+	config.iceServers.emplace_back("stun.l.google.com:19302");
+
+	auto pc1 = std::make_shared<PeerConnection>(config);
+	auto pc2 = std::make_shared<PeerConnection>(config);
 
 	pc1->onLocalDescription([pc2](const Description &sdp) {
 		cout << "Description 1: " << sdp << endl;