diff --git a/examples/client/main.cpp b/examples/client/main.cpp index 688cb5b..243cae6 100644 --- a/examples/client/main.cpp +++ b/examples/client/main.cpp @@ -36,7 +36,6 @@ #include #include - using namespace rtc; using namespace std; using namespace std::chrono_literals; @@ -167,12 +166,12 @@ int main(int argc, char **argv) try { dc->onClosed([id]() { cout << "DataChannel from " << id << " closed" << endl; }); - dc->onMessage([id, wdc = make_weak_ptr(dc)](const variant &message) { - if (holds_alternative(message)) - cout << "Message from " << id << " received: " << get(message) << endl; + dc->onMessage([id, wdc = make_weak_ptr(dc)](variant data) { + if (holds_alternative(data)) + cout << "Message from " << id << " received: " << get(data) << endl; else cout << "Binary message from " << id - << " received, size=" << get(message).size() << endl; + << " received, size=" << get(data).size() << endl; }); dataChannelMap.emplace(id, dc); @@ -225,12 +224,12 @@ shared_ptr createPeerConnection(const Configuration &config, dc->onClosed([id]() { cout << "DataChannel from " << id << " closed" << endl; }); - dc->onMessage([id, wdc = make_weak_ptr(dc)](const variant &message) { - if (holds_alternative(message)) - cout << "Message from " << id << " received: " << get(message) << endl; + dc->onMessage([id, wdc = make_weak_ptr(dc)](variant data) { + if (holds_alternative(data)) + cout << "Message from " << id << " received: " << get(data) << endl; else cout << "Binary message from " << id - << " received, size=" << get(message).size() << endl; + << " received, size=" << get(data).size() << endl; }); dc->send("Hello from " + localId); diff --git a/test/capi_connectivity.cpp b/test/capi_connectivity.cpp index 4f88430..fbf5449 100644 --- a/test/capi_connectivity.cpp +++ b/test/capi_connectivity.cpp @@ -227,12 +227,6 @@ int test_capi_connectivity_main() { goto error; } - if (peer1->signalingState != RTC_SIGNALING_STABLE || - peer2->signalingState != RTC_SIGNALING_STABLE) { - fprintf(stderr, "Signaling state is not stable\n"); - goto error; - } - if (!peer1->connected || !peer2->connected) { fprintf(stderr, "DataChannel is not connected\n"); goto error;