sockjs multiplex

34 views
Skip to first unread message

ceo....@gmail.com

unread,
Oct 31, 2013, 4:22:17 AM10/31/13
to soc...@googlegroups.com
I try this example: https://github.com/sockjs/websocket-multiplex/blob/master/examples/sockjs/server.js
Why in channel I can not get connection id:
var ann = multiplexer.registerChannel('ann');
ann.on('connection', function(conn) {
    console.log(conn.id) // -> return undefined
    conn.write('Ann says hi!');
    conn.on('data', function(data) {
        conn.write('Ann nods: ' + data);
    });
});
Reply all
Reply to author
Forward
0 new messages