Currently I have two network interfaces on my client. I created two separate sockets which binds to each interface ip. Now I also have two servers with each one talking to one socket on the client. I want to be able to receive data (~10MB for now but will be larger later) from both interfaces simultaneously (currently using UDP or DGRAMS) but for some reason there is always a delay in that it has to finish the data transfer with one socket before it begins the transfer on the other socket.
I have confirmed that binding each interface is successful and I am able to communicate on each socket with its respective server. Currently I simply execute s1.recv() and s2.recv() within the same code block.
So my question is that, is the delay due to the "blocking" feature of using recv()? Also through my search it seems there are ways to make the function to be unblocking? But I am not certain how to go about doing that... And would this be resolved by using multithreading? I am a bit rusty with multithread but if it resolves my issue I will look into it. If not then how can I utilize both interfaces in that I am able to receive/send from both interfaces in parallel?
If anyone can assist I would greatly appreciate it.