[En-Nut-Discussion] Unlocking reading files

Ole Reinhardt ole.reinhardt at embedded-it.de
Tue Mar 30 09:43:45 CEST 2010


Hi!

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

In detail this is:

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

Regards,

Ole Reinhardt


-- 

Thermotemp GmbH, Embedded-IT

Embedded Hard-/ Software and Open Source Development, 
Integration and Consulting

http://www.embedded-it.de

Geschäftsstelle Siegen - Steinstraße 67 - D-57072 Siegen - 
tel +49 (0)271 5513597, +49 (0)271-73681 - fax +49 (0)271 736 97

Hauptsitz - Hademarscher Weg 7 - 13503 Berlin
Tel +49 (0)30 4315205 - Fax +49 (0)30 43665002
Geschäftsführer: Jörg Friedrichs, Ole Reinhardt
Handelsregister Berlin Charlottenburg HRB 45978 UstID DE 156329280 




More information about the En-Nut-Discussion mailing list