lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] How can I start a TCP connect retry as a client?


From: Jonathan Larmour
Subject: Re: [lwip-users] How can I start a TCP connect retry as a client?
Date: Mon, 03 Nov 2008 16:38:33 +0000
User-agent: Thunderbird 1.5.0.12 (X11/20070530)

address@hidden wrote:
> 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.

Jifl
-- 
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]