socketIO-client
socketIO-client copied to clipboard
Emit with callback seems not work.
I run the demo that README show.Logger shows what I write in socketio website.But the callback doesn't show anything in terminal. socketIO-client 0.7.0 OS:Ubuntu14.04
`# -- coding:utf-8 --
from socketIO_client import SocketIO,LoggingNamespace import logging
logging.basicConfig(level=logging.DEBUG)
def on_aaa_response(*args): print 'enter' print('on_aaa_response',args)
baseurl="http://119.29.174.145" with SocketIO(baseurl,3000,LoggingNamespace) as socketIO: #Listen socketIO.on('new-tx',on_aaa_response) socketIO.emit('aaa') socketIO.wait()`
Logger show what I type in socketio website.But this code doesn't enter "on_aaa_response" method
Just because no one respond before:
You emit on 'aaa' and listen on 'new-tx' so it's not working. you need the same identifier: socketIO.on('aaa',on_aaa_response) socketIO.emit('aaa')