I am using RTOS SDK and working with socket networking.
When setting the receive timeout I need to set it to a factor 1000 more to get the actual timeout.
struct timeval tv;
tv.tv_sec = 2000;
tv.tv_usec = 0;
if (setsockopt(local_server_sock, SOL_SOCKET, SO_RCVTIMEO,&tv,sizeof(tv)) < 0) {
printf("ntp_time > error setting timeout");
}
Will set the timeout value actually to two seconds.
- Does anyone else notice the same ?
Kind regards,
Herman