Open akosladanyi opened 6 years ago
All UDP receive stuff are asynchronous, we don't know what will come in before it comes. Hence hasPendingUDPBytes, waitForUDPResponse, socketReceiveBytes do not have a parameter for specifying the socket. After there is something received, the packet that is returned by socketReceiveBytes() et al contains the number of the socket for the application to know where the data came from. So, multiple sockets are supported. (Also when sending, the application passes the number of socket to send to).
...we don't know what will come in before it comes.
Well, you could call waitForUDPResponse for each socket with a short timeout.
The functions related to receiving UDP data (hasPendingUDPBytes, waitForUDPResponse, socketReceiveBytes) do not have a socket argument. This design looks a bit strange to me. Why did you choose it? Would you accept a patch which modifies these functions to receive a socket as parameter?