Browse Source

Fixed typo in example code

Paul-Louis Ageneau 4 years ago
parent
commit
7670883b75
1 changed files with 2 additions and 2 deletions
  1. 2 2
      README.md

+ 2 - 2
README.md

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