Hi, all,
I tried to put the module "LearnBoost's Socket.IO-Node", all works, except event 'onClientMessage'
Tell, in what there can be a problem, thanks!
...sorry for my english
io.listen(server, {
onClientConnect: function(client){
client.send(json({ buffer: buffer }));
client.broadcast(json({ announcement: client.sessionId + ' connected' }));
},
onClientDisconnect: function(client){
client.broadcast(json({ announcement: client.sessionId + ' disconnected' }));
},
onClientMessage: function(message, client){
var msg = { mess: [client.sessionId, message] };
buffer.push(msg);
if (buffer.length > 15) {
buffer.shift();
}
client.broadcast(json(msg));
}