瀏覽代碼

Merge pull request #607 from fresheneesz/patch-1

Improving the Receive example
Alex Sosnovskiy 5 年之前
父節點
當前提交
5e36ba17be
共有 1 個文件被更改,包括 3 次插入0 次删除
  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!');
+  });
 });
 ```