Receiving response(s) from N number of clients in reply to a broadcast request over UDP
Date : March 29 2020, 07:55 AM
help you fix your problem How many times will I have to call recvfrom()? When will I come to know that I have handled the response from all the devices/servers?
/* get socket to receive responses */
sd = socket( ... );
do
{
/* set receive timeout */
timeout.tv_sec = 5;
/* broadcast request */
sendto( ... );
/* wait for responses (or timeout) */
while(select(sd+1, &readfds, NULL, NULL, &timeout) > 0)
{
/* receive the response */
recvfrom( ... );
/* process the response (or queue for another thread / later processing) */
...
/* reset receive timeout */
timeout.tv_sec = 5;
}
/* process any response queued for later (and not another thread) */
} while (necessary);
|
Why doesn't a HTTP reply from server specify the GET request to which the reply corresponds?
Date : March 29 2020, 07:55 AM
|
receiving a 404 error when I make a post request to api server
Date : March 29 2020, 07:55 AM
This might help you I needed to restart the server so the new methods could be pulled in. For the 1 person who actually reads this. To restart the server the command is pm2 start all
|
Can I reply to a HTTP Request Before I've Finished Receiving it?
Date : March 29 2020, 07:55 AM
|
TcpClient not receiving full server reply
Tag : chash , By : CHeMoTaCTiC
Date : March 29 2020, 07:55 AM
|