On Tue, 2009-04-28 at 18:35 +0800, inner T wrote:
> Hi All
> 
> 
>     I got a problem about handle the passive close. After connect to
> the server, I have a Client thread like this:
> 
> 
> // Client thread
> uint8 buff[buff_LEN];
> ......
> for(;;) {
> ......
> llen = lwip_recv( sockClient, buff, buff_LEN, 0 );  // wait for data
> if( llen ) {
> // some data recived, handle data
> }
> // do other works...

What do you do if llen is returned as zero by lwip_recv()?  This is the
way that lwip_recv() tells you that the socket has been closed.

Kieran



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

Reply via email to