[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] Data waiting but no recv()
From: |
Josh Rothstein |
Subject: |
RE: [lwip-users] Data waiting but no recv() |
Date: |
Mon, 21 Jan 2008 17:38:22 -0800 |
Is there a better alternative if I am using version 1.2.0.?
-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
Jonathan Larmour
Sent: Monday, January 21, 2008 5:26 PM
To: Mailing list for lwIP users
Cc: 'Campanella, David'; 'John Zigrang'
Subject: Re: [lwip-users] Data waiting but no recv()
Josh Rothstein wrote:
>
> What is the correct way to make sure that my stack does not lock up if I
> am receiving unexpected data over a connection? Should I just poll()
> each time around the loop? I cannot just place extra recv()s around the
> loop or else my task will block if no data is waiting.
Theoretically, you can do it in a different task, use select() to wait for
multiple sockets when you would be blocked waiting for input anyway and/or
use non-blocking sockets if you were going to be doing a busy poll anyway.
But the more efficient choice is to enable the LWIP_SO_RCVBUF option in
lwipopts.h and use setsockopt() to set 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.
------["The best things in life aren't things."]------ Opinions==mine
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users
- [lwip-users] Data waiting but no recv(), Josh Rothstein, 2008/01/21
- Re: [lwip-users] Data waiting but no recv(), Jonathan Larmour, 2008/01/21
- RE: [lwip-users] Data waiting but no recv(),
Josh Rothstein <=
- Re: [lwip-users] Data waiting but no recv(), Jonathan Larmour, 2008/01/21
- RE: [lwip-users] Data waiting but no recv(), Josh Rothstein, 2008/01/21
- RE: [lwip-users] Data waiting but no recv(), Josh Rothstein, 2008/01/21
- RE: [lwip-users] Data waiting but no recv(), Josh Rothstein, 2008/01/21
- RE: [lwip-users] Data waiting but no recv(), Josh Rothstein, 2008/01/21
- Re: [lwip-users] Data waiting but no recv(), Jonathan Larmour, 2008/01/22
Re: [lwip-users] Data waiting but no recv(), Piero 74, 2008/01/23