[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] TCP listen fucntion always return <=0
From: |
Kieran Mansley |
Subject: |
Re: [lwip-users] TCP listen fucntion always return <=0 |
Date: |
Fri, 18 Sep 2009 10:11:20 +0100 |
On Fri, 2009-09-18 at 10:48 +0200, Oscar F wrote:
> The function with error is lwip_listen(lSocket[i],10) != 0, the first
> time return 0 but then return -1 for the next socket.
I'm asking some simple questions to help find the cause of your problem
but you keep failing to answer them. I need to know the values of
MEMP_NUM_NETCONN and errno. Please note that errno is not the value
returned by lwip_listen(), it is a global C variable.
Could you for example add the following line of code after the call to
lwip_listen() fails:
printf("MEMP_NUM_NETCONN: %d, errno: %d\n", MEMP_NUM_NETCONN, errno);
and tell us what it prints out?
Your code should now look like this:
//Listen to the 8 socket.Maximum 10 connection for socket
if ( lwip_listen(lSocket[i],10) != 0 )
{
printf("MEMP_NUM_NETCONN: %d, errno: %d\n", MEMP_NUM_NETCONN, errno);
lwip_close(lSocket[i]); //Always enter here
}
(you may need to replace printf with whatever you platform's equivalent
function is)
Thanks
Kieran
- [lwip-users] TCP listen fucntion always return <=0, Oscar F, 2009/09/18
- [lwip-users] Re: TCP listen fucntion always return <=0, Oscar F, 2009/09/18
- Re: [lwip-users] TCP listen fucntion always return <=0, Kieran Mansley, 2009/09/18
- Re: [lwip-users] TCP listen fucntion always return <=0, Oscar F, 2009/09/18
- Re: [lwip-users] TCP listen fucntion always return <=0, Kieran Mansley, 2009/09/18
- Re: [lwip-users] TCP listen fucntion always return <=0, Oscar F, 2009/09/18
- Re: [lwip-users] TCP listen fucntion always return <=0, Kieran Mansley, 2009/09/18
- Re: [lwip-users] TCP listen fucntion always return <=0, Oscar F, 2009/09/18
- Re: [lwip-users] TCP listen fucntion always return <=0,
Kieran Mansley <=
- Re: [lwip-users] TCP listen fucntion always return <=0, Oscar F, 2009/09/18
- Re: [lwip-users] TCP listen fucntion always return <=0, Oscar F, 2009/09/18
- Re: [lwip-users] TCP listen fucntion always return <=0, Kieran Mansley, 2009/09/18
- Re: [lwip-users] TCP listen fucntion always return <=0, Oscar F, 2009/09/18
- Re: [lwip-users] TCP listen fucntion always return <=0, Oscar F, 2009/09/18
- Re: [lwip-users] TCP listen fucntion always return <=0, Kieran Mansley, 2009/09/18
- Re: [lwip-users] TCP listen fucntion always return <=0, Oscar F, 2009/09/18