Åke Forslund wrote:
I see my mistake there, however even with code that is at least theoretically
sane I can't establish a connection. lwip_accept() always returns EWOULDBLOCK
for me.
from socket debug:
lwip_accept(0)...
lwip_accept(0): returning EWOULDBLOCK
[Repeats forever]
putty reports "Connection closed by remote host" followed by "Network error: Software caused
connection abort" or "Connection reset by Peer"
I have pasted your code into test.c in the Win32 port from contrib,
removed your application-specific code, checked the return value of
lwip_accept() and I could successfully connect using telnet.exe provided
with windows XP.
If it's not working for you, that suggests a problem either in your
port or in the client application, I guess... What are the thread
priorities in your system? Are you sure there is only one thread active
in lwIP at a time? Because that's the main difference between the
blocking and your non-blocking version: the blocking version just sits
there and waits for a callback that lets lwip_accept return, while the
non-blocking version calls into tcpip_thread *very* often - if your
threading is broken, there's a good chance this will be revealed by your
way of using non-blocking sockets.
Simon
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users