Fixed typo in example code

This commit is contained in:
Paul-Louis Ageneau
2021-03-02 21:48:25 +01:00
parent b264774c2a
commit 7670883b75

View File

@ -183,11 +183,11 @@ pc.onGatheringStateChange([](PeerConnection::GatheringState state) {
```cpp ```cpp
auto dc = pc.createDataChannel("test"); auto dc = pc.createDataChannel("test");
dc.onOpen([]() { dc->onOpen([]() {
cout << "Open" << endl; cout << "Open" << endl;
}); });
dc.onMessage([](variant<binary, string> message) { dc->onMessage([](variant<binary, string> message) {
if (holds_alternative<string>(message)) { if (holds_alternative<string>(message)) {
cout << "Received: " << get<string>(message) << endl; cout << "Received: " << get<string>(message) << endl;
} }