AW: [En-Nut-Discussion] TCPIP errno question
Oliver Schulz
olischulz at web.de
Mon Nov 24 22:43:21 CET 2003
Hi Kyle,
as far as I can see, the errno 10057 is only returned, if you try
NutTcpReceive or NutTcpSend (they are executed if you call _read or _write)
on a socket which is not in TCPS_ESTABLISHED state.
Once the socket is in TCPS_ESTABLISHED state, it can only change the state
if a packet with set RST (reset) or FIN (finished) flag is received.
This can only happen if you close the socket by calling NutTcpCloseSocket,
or try to send the peer some data, while the peer's socket is already
closed.
I hope, that's right, the TCP state machine is not easy to unterstand....
Regards,
Oliver.
-----Ursprungliche Nachricht-----
Von: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de]Im Auftrag von Kyle Rhodes
Gesendet: Montag, 24. November 2003 21:39
An: Nut/OS list
Betreff: [En-Nut-Discussion] TCPIP errno question
Hello all,
I was wondering what exactly causes an errno of 10057 (socket not
connected). I understand that if the client disconnects, and a _read() or
_write() is attempted, this error will occur, but is that the only potential
cause? Could something go wrong within NutOS to cause the connection to be
dropped?
This occurs once in a while when I'm transferring data back and forth
between my Ethernet board and my client application. I don't seem to get a
"disconnected" event on the PC side until a _read() is attempted on my
Ethernet board and it returns the error and resets the connection.
There shouldn't be any reason the connection is dropped, I'm trying to
figure out if the problem is with my PC application, or my Ethernet board.
Thanks for any help,
Kyle Rhodes
Hardware / Software Engineer
gh, LLC
3000 Kent Ave
Lafayette, IN 47906
(765) 775-3776 ext 205
More information about the En-Nut-Discussion
mailing list