Thanks Kieran. I have another question why lwIP did not give a open API for get the erro reason. I find there is only "sock_set_errno" define, but no "sock_get_errno" define.
I will contingouse debug why it not block. Lee On Fri, Dec 5, 2008 at 11:39 PM, Kieran Mansley <[EMAIL PROTECTED]> wrote: > On Fri, 2008-12-05 at 23:21 +0800, yueyue papa wrote: > > I just understand. It is not the memory leak problem. > > > > sock->lastdata = buf = netconn_recv(sock->conn); <<<=== means no data > > available. > > > > but my socket is a block socket, why it do not block ? > > There were lots of reasons why netconn_recv() will return NULL - take a > look at the source for netconn_recv() to see them all. The sockets > layer tries to set errno to say what the problem is, but if that's not > available to you on your platform then add a bit of debugging in the > code that you quote to print the value of sock->conn->err. This should > explain what's going on. > > Kieran > > > > > _______________________________________________ > 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
