I am implementing a udp listen server based on this https://linux.m2osw.com/c-implementation-udp-clientserver. I noticed when establishing a timeout receiver the author included "f_socket+1" when making the select call. I am wondering what exactly this is doing? Any explanation helpful, thank you!
excerpt of function from above link:
FD_ZERO(&s);
FD_SET(f_socket, &s);
struct timeval timeout;
timeout.tv_sec = max_wait_ms / 1000;
timeout.tv_usec = (max_wait_ms % 1000) * 1000;
int retval = select(f_socket + 1, &s, &s, &s, &timeout);