How much timeout have you set in your socket option? If receive timeout works then select should work too (I have not tested it myself though). One last thing to check is, try to increase timeout value and see if you get some data or not.
So far I have used SO_RCVTIMEO socket functionality for timeout, and I have always received data. Never had problems with it. However, I would like to switch to select() for timeouts, because of some various reasons.
If you do not use select call, Are you able to receive anything? It may be possible that since there is no data available select will eventually timeout.
Regards,
Ajay bhargav
Hi Ajay,
I have just checked it. Since timeout always expires, return value of lwip_select() is always 0. Therefore no errno is set.
Hi Nenad,
Did you check errno?
Regards,
Ajay Bhargav
Hi people,
I am trying to use lwip_select in combination with lwip_recv. I have
done it like this so far:
FD_ZERO(&rfds);
FD_SET(new_sd, &rfds);
tv.tv_sec = 0;
tv.tv_usec = 200000;
if (lwip_select(new_sd + 1, &rfds, NULL, NULL, &tv) > 0)
{
lwip_recv()
}
No matter what, timeout always exceeds. Am I doing anything wrong?
Should I include some lwip option in order to use lwip_select()?
I am using lwip v1.4.1.
Regards,
Nenad
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users