[En-Nut-Discussion] unreliable tcp

Harald Kipp harald.kipp at egnite.de
Tue Apr 8 13:21:31 CEST 2008


Hi András,

Szemző András wrote:
>  
> I tried to use Commview to capture packets, and I see the sam7x doesn't get
> answer within a time. Normally it sends a PUSH ACK, get answer PUSH ACK,
> and send ACK. I see when there are problems, it tries to send PUSH ACK with
> retransmission, and if it gets answer it doesn't reconnect.
> My app's loop send a packet if it needs, than read back the answer, and with
> 100ms RECV timeout tries to read to see, if he got some incoming packets.
> I see when there are reconnects, the NutTcpReceive() will return with -1,
> wich means socket is disconnected. (sock->so_state will be 0 in this case)

The reconnect _must_ have been initiated by your application. The stack 
by itself will not reconnect. Probably because of the -1 returned by 
NutTcpReceive().

NutTcpReceive will return -1 only in case of fatal errors (e.g. out of 
memory) or if it receives a connection close (FIN) or connection reject 
(RST).

What does NutHeapAvailable() return?


Harald



More information about the En-Nut-Discussion mailing list