simb/FlashSocket.IO — Issue #9: feature requests: callbacks on event
Author: matt-callanan
Created: 2011-12-16 19:33:51+00:00
State: open

Requesting callbacks on events, per our quick email exchange.

Here's how it works in node:

Client:

socket.emit('test', { from: "client" }, function(response) {
//do stuff with response, which == { from: "server" }
});

Server:

socket.on('test', function(message, callback) {
//do stuff with message, which == { from: "client" }
callback({ from: "server" });
});