FreeRTOS and socket timeout value
Posted: Wed Jan 07, 2015 2:43 pm
LS,
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.
Will set the timeout value actually to two seconds.
- Does anyone else notice the same ?
Kind regards,
Herman
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.
Code: Select all
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