I think i understand what you r saying, you have to wait until u get the response for the command. If there is any request in between (during wait), you have send it right? For that you can use TCP asynchronous send/receive method, but u include a packet identifier eg. PACKET#1 as part of the message, on the receiver end the response should be made with this packet identifier. (like a handshake mechanism)