Explorar o código

Added onOpen callback to test

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

+ 4 - 1
test/main.cpp

@@ -63,7 +63,10 @@ int main(int argc, char **argv) {
 	});
 
 	auto dc1 = pc1->createDataChannel("test");
+	dc1->onOpen([dc1]() {
+		cout << "DataChannel open: " << dc1->label() << endl;
+	});
 
-	this_thread::sleep_for(120s);
+	this_thread::sleep_for(10s);
 }