I have 4 Servers with the same functionality running on the same machine (return random int after random amount of time)
I have one client that runs the function in every server waits the return and prints all four numbers.
how can this be achieved with wcf?
Assuming that your question is correct, You can host the same service with four different end points on the same server and your client will have the reference to all the four. Implement an “async” method on the client side to call the Function on four end points and print all of them once you got the result from all the four.
Small sample from online for async implementation — https://gist.github.com/1223284