According to the manual page for recv(), errno is set to EAGAIN or EWOULDBLOCK if a timeout has been set for receive using setsockopt(SO_RCVTIMEO).
My question is what happens if multiple such sockets are used with select(). Would select return if one of the socket times out due to inactivity. What would be returned by select().
I am trying to implement a tftp server with feature to detect timeouts. One way could be to use a timeout with select() but then I would have to use a different value of timeout for each socket and keep updating the timer to the minimum value, and then do some more juggling.... etc.. etc... Just feels like a lot of unnecessary work.
PS: The tftp server is a concurrent server with multiple clients being handled using I/O Multiplexing.