lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Advice on API for this application


From: Simon Goldschmidt
Subject: Re: [lwip-users] Advice on API for this application
Date: Tue, 07 Dec 2010 05:12:56 +0100

"shogun" <address@hidden> wrote:
> I have a general question about choosing the correct API to use for lwip.
> Is the RAW API typically used without an OS and the netcomm and  BSD API
> typically used with an RTOS?

Not necessarily: netconn- and socket API won't work without an OS, but there's 
no reason to no use the raw API with an OS only because you can use it with an 
OS...

I guess if you're not stuck with the portable socket API, it rather depends on 
your application design, wether you want a sequential API or a callback API.

> .. I was thinking I could continue to use the RAW
> API
> with an OS and just have the RAW API callbacks send queue messages to a
> single task I will create ("TCPIP_TASK" to give it a name) and have only
> the
> TCPIP_TASK thread access lwip stack.

That's perfect.

> I see that if NO_SYS is not set,
> lwip
> will create two threads.

Two threads? Normally, it should create only one thread for the stack, the rest 
are application threads (e.g. using the APIs).

> Speed is not a big concern but
> keeping
> message latency low is a high priority.

If latency is an issue, the raw API is probably best since it can handle 
messages without thread context changes, which are required with the other 2 
APIs.

Simon
-- 
GMX DSL Doppel-Flat ab 19,99 &euro;/mtl.! Jetzt auch mit 
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl



reply via email to

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