lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Using both sequential and raw APIs


From: CHAN CHIN KIONG
Subject: Re: [lwip-users] Using both sequential and raw APIs
Date: Thu, 6 Nov 2008 19:07:34 +0800
User-agent: JARING Webmail v1.2 (http://www.jaring.my)

Thanks Jonathan !

i patched my copy of api_lib.c with reference to
"Implement SO_RCVTIMEO for accept and recv on TCP connections, such
present in patch #5959."
http://cvs.savannah.gnu.org/viewvc/lwip/src/api/api_lib.c?revision=1.48&root=lwip&view=markup

and i found old posting from you on how to use the timeout:
/* Call it a timeout if there is nothing in 60 seconds */
  conn->recv_timeout = 60*1000;
  buf = netconn_recv(conn);
  if (!buf) {
     /* It timed out */
     ...
  }

my problem solved. thanks again !


From:   Jonathan Larmour
Subject:        Re: [lwip-users] Using both sequential and raw APIs
Date:   Wed, 05 Nov 2008 23:37:14 +0000

ckchan wrote:
>
> i'm trying to workaround the netconn_recv blocking since i'm using lwIP
> 1.1.0. i want to send tcp packet at fixed interval (say every 1 sec) to
> the server,  while still be able to received (non fixed interval) tcp
> packet from server. using only netconn APIs, i could only do "either"
> and not "both".

While it shouldn't be terribly difficult for you to upgrade, at a minimum
it would probably not be too difficult to backport the patch. It was
discussed here, and you can use cvs around the date of committing (23rd
May
2007 according to https://savannah.nongnu.org/patch/index.php?5959 ) to
get it.

Something like "cvs -q diff -D 2007-05-22 -D 2007-05-24" may be sufficient
but I haven't tried it.

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




----------------------------------------------------------------
This e-mail has been sent via JARING webmail at http://www.jaring.my





reply via email to

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