how to handle data over two distinct socket connection
What i need is creating a server and client and client should make two connections to the server.
Then server send 4 numbers through two connections and client has to do some calculations and send back the answer two server.
numbers can come randomly.that means one number can be come through one connection while others come through second connection.
But I have to send the answer as soon as I got two numbers.How can I handle data which come from two connections?