> Hi, Groups!
> I use LwIP 1.3.0 with Raw APIs.
> Now it works as a TCP client. The server is a VC program.
> If the sever is start first, LwIP can connect with it OK.
> If LwIP starts earlier than the server, it can not connect.
> Now I have set TCP_SYNMAXRTX to 12. It is the max value.
> If client start to early, it can not connect.
> So I want to make the client keep connceting till the server can accept.
> How can I do?
When TCP_SYNMAXRTX is exceeded, the TCP error event callback will be
invoked. You just have to make sure you installed something on that. If you
have, then you can use that to create the PCB again, and retry.
Look for mentions of TCP_EVENT in include/lwip/tcp.h to see about the
callbacks. But in essence, all you need to do is set the errf callback
function pointer in the TCP PCB.
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------ Opinions==mine
lwip-users mailing list