File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 194
194
< pre class ="prettyprint ">
195
195
// client-side
196
196
var socket = io.connect();
197
- socket.emit('set nickname', 'john', function (response) [
197
+ socket.emit('set nickname', 'john', function (response) {
198
198
console.log(response);
199
199
});
200
200
424
424
});
425
425
426
426
socket.on('msg', function () {
427
- socket.get('nickname', function (name) {
427
+ socket.get('nickname', function (err, name) {
428
428
console.log('Chat message by ', name);
429
429
});
430
430
});
603
603
< a href ="http://github.com/learnboost/socket.io "> < img style ="position: absolute; top: 0; right: 0; border: 0; " src ="http://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png " alt ="Fork me on GitHub " /> </ a >
604
604
605
605
</ body >
606
- </ html >
606
+ </ html >
You can’t perform that action at this time.
0 commit comments