lwip-users
[Top][All Lists]
Advanced

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

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


From:
Subject: Re: Re: [lwip-users] How can I start a TCP connect retry as a client?
Date: Tue, 4 Nov 2008 09:56:37 +0800

Hi, Jonathan!
I have test the tcp_err just now.
It works exactly same as you said.
I did not use LWIP_EVENT_API but used LWIP_CALLBACK_API.
I can get a notice when the connection failed.
They have same effect.
Thank you!
 
Best Regards!
Locke_h 
 

2008-11-04

发件人: Jonathan Larmour
发送时间: 2008-11-04 00:41:05
收件人: Mailing list for lwIP users
抄送:
主题: Re: [lwip-users] How can I start a TCP connect retry as a client?
 
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
 
 
_______________________________________________
lwip-users mailing list
address@hidden
 

reply via email to

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