I am using FlashSocket on my client side to make calls to socket.io on node.js server.
But i want specific values and function references to be available in the socket event listeners.
One approach that came to my mind was to pass the required values along with the request and make the server to send those parameters back along with the data. But that doesn't seem to help since I need the function handlers to be returned as well with the result.
The way i am doing it with http request is:
var token:AsyncToken = _service.send(item.params);
token.id = _tokenId;
token.params = item.params;
token.handler = item.resultHandler; // this would be called later in result or fault event handlers.
Is there a way to achieve this in flex sockets?
Thanks in advance.