I tried to put the module "LearnBoost's Socket.IO-Node", all works, except event onClientMessage.
Tell me what is the problem.
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));
}