the best way to talk to multiple UDP/TCP servers?
Wang Weijun
weijun.wang at oracle.com
Fri Apr 18 15:21:47 UTC 2014
I'm writing a client which talks to 3 servers, and would like to write a method that
sends request to server 1 at time 0:01
sends request to server 2 at time 0:02
sends request to server 3 at time 0:03
sends request to server 1 at time 0:11
sends request to server 2 at time 0:12
sends request to server 3 at time 0:13
waits until 0:20
During this whole period, whenever a response from a server is received, the method returns and no more request is sent. The protocol can be UDP or TCP. What is the best way I can do this with NIO?
Thanks
Max
More information about the nio-dev
mailing list