前言
来自于 Web Audio Api
zara is an rpc lib zara
install
1
2
3
npm install zara --save
// ...or
yarn add zara
server
In Sandbox class, it will save env object when a client connect, different connection with
different env. env will contain userId in default, which is connection id. when disconnect
sandbox will destory automatically.
Then you shou pass ws listen port and Sandbox to Server function to start rpc. default port
is 3189
这里我观看了 @Richard Gong 的node.js高级编程03:events对象以及查阅书籍做出的简单模仿(ES6写法)。
首先新建个名字为 EventEmitter 的 class 。
之后给其添加属性以及原型方法。
Update your browser to view this website correctly. Update my browser now