Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
APIs
lwIP provides three Application Program's Interfaces (APIs) for programs to use for communication with the TCP/IP code:
- low-level "core" / "callback" or "raw" APIs.
Modules | |
| "raw" APIs | |
Non thread-safe APIs, callback style for maximum performance and minimum memory footprint. | |
| Sequential-style APIs | |
Sequential-style APIs, blocking functions. | |
| Socket API | |
BSD-style socket API. | |
Detailed Description
lwIP provides three Application Program's Interfaces (APIs) for programs to use for communication with the TCP/IP code:
- low-level "core" / "callback" or "raw" APIs.
- higher-level Sequential-style APIs.
- BSD-style Socket API.
The raw TCP/IP interface allows the application program to integrate better with the TCP/IP code. Program execution is event based by having callback functions being called from within the TCP/IP code. The TCP/IP code and the application program both run in the same thread. The sequential API has a much higher overhead and is not very well suited for small systems since it forces a multithreaded paradigm on the application.
The raw TCP/IP interface is not only faster in terms of code execution time but is also less memory intensive. The drawback is that program development is somewhat harder and application programs written for the raw TCP/IP interface are more difficult to understand. Still, this is the preferred way of writing applications that should be small in code size and memory usage.
All APIs can be used simultaneously by different application programs. In fact, the sequential API is implemented as an application program using the raw TCP/IP interface.
Do not confuse the lwIP raw API with raw Ethernet or IP sockets. The former is a way of interfacing the lwIP network stack (including TCP and UDP), the latter refers to processing raw Ethernet or IP data instead of TCP connections or UDP packets.
Raw API applications may never block since all packet processing (input and output) as well as timer processing (TCP mainly) is done in a single execution context.
Generated on Tue Jul 12 2022 13:55:22 by
1.7.2