-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Socket.io send/emit with Callback #17
Comments
Is there anyone have answer for this ? the Event call back is not working when using it like below. sio->on("connect", target, callback(&TestTarget::ontestevent)); Please how can I receive callback response from the server ? |
Hi,
first of all: Wonderful Socket.IO framework :)
But I still have a small request, I wonder how to realize the best, maybe it's on your agenda, or you have other ideas how to solve this (if technically not possible):
referring http://socket.io/#how-to-use there is something called callbacks (definable within a send or emit):
Sending and getting data (acknowledgements). Sometimes, you might want to get a callback when the client confirmed the message reception.To do this, simply pass a function as the last parameter of `.send` or `.emit`. What's more, when you use `.emit`, the acknowledgement is done by you, which means you can also pass data along: SERVER
CLIENT
Is this somehow possible?
Kind regards
BlackHornet
The text was updated successfully, but these errors were encountered: