DownyTif wrote:
Hi all,
I was wondering what API I should use to do what I want to do. By the way,
I'm new to the mail-list/forum and lwip world. I tried to find the
differences between the Raw, sockets or sequential (netconn) APIs, but I
haven't found anything useful.
http://lwip.wikia.com/wiki/LwIP_Wiki has a lot of stuff about the APIs. In
essence the raw API is event-driven, the sequential (netconn) API, is a
more traditional API with calls to e.g. netconn_write() which can block
until the operation completes, and the sockets API is the same sort of
thing as the sequential API, but using the well-known BSD sockets
functions (like socket(), bind(), listen() accept(), etc.).
Each API (raw->sequential->sockets) in turn has more overhead (both code
and data) and is slightly slower than the previous one, and for some
hardware, you can get much better performance with the raw or sequential
APIs than the sockets API in some situations, but that doesn't mean the
sequential or sockets APIs are slow. If performance is critical for you
(and your other mail implies this might be tree) it could be that the raw
API is a better choice. Although you have to do more things yourself with
the raw API.
So, I was thinking that maybe the sequential API (netconn) was not the way
to go.
It's unrelated to your other mail about large packet sizes. An
event-driven model such as the raw API affects your program design a lot.
Some people like the familiarity of the sockets API if they've used it
elsewhere, or if they are reusing existing code. It's a choice with
trade-offs between them, which is why lwIP has all three!
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
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users