소스 검색

Added onOpen callback to test

Paul-Louis Ageneau 6 년 전
부모
커밋
c7a1aad494
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  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);
 }