I've attempted the question different ways, check my profile for the other two questions explaining the difficulty I've had with the approaches I've taken to this scenario. I'll skip them here.
I just need an example (C# preferred) of a server calling back to a client (over a nettcp channel), the client calculates an answer, and returns a result.
- The server's calling thread is blocked until the client sends the response.
- The server's callback is prompted by some event, such as a timer, not a call by the client.
- The client does not need to call back to the server within the context of the server's callback, so there should be no deadlocking challenges.
- The client may take (and for this exercise, should take) one or more parameters with which to perform the calculation
- The client may return (and for this exercise, should return) a non-void result
- The approach used should at least be compatible, if not implemented, with the ability to handle multiple clients in turn, including a subscribe() and unsubscribe() functionality.
- This is not homework, it is to serve as an example of how to build a WCF-based subscriber/publisher server that supports (few) trusted clients with low latency server-client communication without polling and without throwing messages (over the fence)
- I am specifically NOT interested in solutions that involve
(IsOneWay = true)
, unless it becomes clear that I am very confused about its meaning and its consequences.
Thanks!