[En-Nut-Discussion] Unlocking reading files

Harald Kipp harald.kipp at egnite.de
Wed Mar 31 10:04:35 CEST 2010


Ole Reinhardt wrote:

>> Use NutSetSocketOptions(I gues this is the name) and set timeout to 
>> read, so if no data arrive until timeout the read returns.
> 

> uint32_t timeout; // where timeout is in ms
> NutTcpSetSockOpt(sock, SO_RCVTIMEO, &timeout, sizeof(timeout));
> NutTcpSetSockOpt(sock, SO_SNDTIMEO, &timeout, sizeof(timeout));	

Thanks, Ole. I'd like to add a pointer to

http://www.ethernut.de/nutwiki/Nut/OS_Examples

specifically

http://www.ethernut.de/nutwiki/Socket_Timeouts


Harald



More information about the En-Nut-Discussion mailing list