Thanks Simon,

This rings a bell now that you say it. I do now recall seeing this in some
code.  I double-checked Adam's original 2001 document and there's a comment
on an else (where pbuf is NULL) that the connection was closed.  It may be
in the httpd demo also.

Bill
 
> On Behalf Of [EMAIL PROTECTED]
> Sent: Tuesday, March 04, 2008 2:31 PM
> To: Mailing list for lwIP users
> Subject: Re: [lwip-users] tcp_close callback
> 
> Bill,
> 
> I don't know exactly from where I took this info or where it is
> documented, but the recv callback is called with a NULL pointer when the
> connection has closed.
> 
> Simon
> 
> 
> Bill Auerbach schrieb:
> >
> > Hello,
> >
> > I was wondering why there is no tcp_closed callback function. I
> > suspect there's a good reason. I have a PC-based status window using a
> > socket and I'd like to write to the connection only when the port is
> > opened. I start logging on the tcp_accept callback and I'd like to
> > stop on a tcp_closed callback, or some other way to know the
> > connection has closed. Does anyone have any ideas or thoughts on this?
> > I probably can watch the pcb state, but I'm trying to have my
> > application not go further than API calls if I can help it.
> >
> > Thanks,
> >
> > Bill
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > lwip-users mailing list
> > [email protected]
> > http://lists.nongnu.org/mailman/listinfo/lwip-users
> 
> 
> 
> _______________________________________________
> lwip-users mailing list
> [email protected]
> http://lists.nongnu.org/mailman/listinfo/lwip-users



_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to