Explorar o código

Merge pull request #607 from fresheneesz/patch-1

Improving the Receive example
Alex Sosnovskiy %!s(int64=5) %!d(string=hai) anos
pai
achega
5e36ba17be
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      README.md

+ 3 - 0
README.md

@@ -41,6 +41,9 @@ peer.on('connection', (conn) => {
     // Will print 'hi!'
     console.log(data);
   });
+  conn.on('open', () => {
+    conn.send('hello!');
+  });
 });
 ```