javascript - Can't seem to emit custom event with socket.io -
alright guys i'm stuck on , can't seem figure out why it's not working. i'm still relatively new using socket.io , hoping more experience can help me out. added event listener 'typing' when user typing broadcasts room user
typing...
on 'bindsocketevents' server side have following
//nickname set socket.emit('typing', { nick: nickname });
and in 'binddomevents` function have
socket.on('typing', function(data){ $('<li>' + data.nick + ' typing...</li>').appendto('.chat-rooms ul li'); }); //dont mind appending trying working
my event doesn't seem emitted though , socket.on 'typing' never fired
javascript jquery node.js socket.io
No comments:
Post a Comment