Thanks for this great plugin but I'm having trouble understanding the LastData bit.
Why not present data?
Consider:
io.sockets.on('connection', function (client) {
client.userid = UUID();
client.emit('onconnection', {id: client.id});
console.log('\t socket.io:: player ' + client.userid + ' connected');
client.on('disconnect', function () {
console.log('\t socket.io:: client disconnected ' + client.userid );
});
});
I do a connection, then check if any data is available. If I receive an event named 'onconnection' I spit out the alert with Socket.LastData.
This comes up as 'websocket' before another alert '[Object] [object]' which is the one I want.
What is this 'websocket', why do we look one step back in time?
I must be missing something here!