๋ฐํ์๋ฃ: http://www.slideshare.net/kingori/ss-68326596
- socket io master zip ๋ค์ด๋ก๋
- ์๋ฒ๊ฐ ack ๋ฅผ ์ฒ๋ฆฌํ๋๋ก examples/chat/index.js ์์
```
socket.on('new message', function (data, ack) {
// we tell the client to execute 'new message'
socket.broadcast.emit('new message', {
username: socket.username,
message: data
});
if( ack) {
ack('ack');
}
});
```
```
$ cd socket.io
$ npm install
$ cd examples/chat
$ npm install
$ DEBUG=socket.io* node .
```