Explorar el Código

Added onOpen callback to test

Paul-Louis Ageneau hace 6 años
padre
commit
c7a1aad494
Se han modificado 1 ficheros con 4 adiciones y 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);
 }