[lwip-users] Problem with lwip_select under Nucleus
From:
brivero
Subject:
[lwip-users] Problem with lwip_select under Nucleus
Date:
Tue, 22 May 2007 11:01:51 +0200
Hello,
I´m trying to use the socket layer under
Nucleus, and I hace a problem with the lwip_select function.
The fact is that I am trying to make a standard code work. In it there
is a tcpserver which does create a socket, bind it, listen and when accept
is done send. On the other hand I´ve got a tcpclient which does create
a socket, connect to the server and receive. All works if Imake the client
wait a second just before receiving. If not, the server finds no suitable
connection for the time it is going to send the information actually. This
means, the client finishes execution deleting the connection for when the
server wants to send.
I understand that the undelaying problem
is that lwip sockets are non blocking for default. Then I should use lwip_select
just before receive in the client.
I´ve tried this too, but the fact is
that there is something wrong with the semaphores. I´ve debugged the client
application, and it can be seen how inside the select function the code
follows all the logic path, seeing how no readset socket gets active, activating
the semaphores and so on. Nevertheless, it is clear that the select does
not wait the 5 seconds timeval parameter!
Can there be any problem with the semaphores
attached to the porting or something similar?