[En-Nut-Discussion] NutTcpConnect Lock Up

Harald Kipp harald.kipp at egnite.de
Tue Jan 16 10:14:54 CET 2007


EnNut at thezachariasgroup.com schrieb:
>    I'm running 4.1.99 with a AT91SAM7X256 board.
>    I have a PC running a .Net application waiting to accept a 
> connection on port 0x8040.
>    My desire is to start at 192.168.1.0 and work my way up towards 
> 192.168.1.255 until I connect to the PC running the .Net application.
>    The problem is that NutTcpConnect doesn't return when trying to 
> connect to 192.168.1.35 if the starting address is 192.168.1.0.
>    If I start at 192.168.1.20 then it locks up when trying 192.168.1.55.
>   


It is generally a bad idea to use TCP for checking the availability of a 
host. Better use ICMP (not directly supported by Nut/OS yet) or UDP 
(requires additional software on the server).

You may set a socket timeout option, but still... you'll end up with a 
large number of waiting connections, eating lots of RAM.

x.x.x.0 is a network address, never the address of a specific host.

Harald




More information about the En-Nut-Discussion mailing list