Archived
This forum has been archived. Please start a new discussion on GitHub.
Repeating callbacks
Lance
in Help Center
Is there any way using the AMI/AMD asynchronous calls to make repeated callbacks to a client from the server. I.e. client makes call to server, server sends results back to client in a callback, the server can then call the callback again and again, sending different data to the client?
Cheers
Lance
Cheers
Lance
0
Comments
-
Hi Lance,
The first reply that your server sends isn't really a callback, i.e., it's not an invocation from server to client, it's merely a delayed response to the client's original request.
If your server needs to make invocations on the client, then the client must provide the server with a proxy that the server can use (i.e., the server becomes a client). The server can use synchronous invocations or AMI, just like any other client.
See the example in demo/Ice/callback for some sample code. Also note that if your server needs to traverse firewalls in order to make callbacks on the client, then you should read about Glacier in the Ice manual.
Hope that helps,
- Mark0
