This example demonstrates how you can collect statistics from network sockets. You can enable statistics with the nsapi.socket-stats-enable
configuration option:
{
"target_overrides": {
"*": {
"nsapi.socket-stats-enable": true
}
}
}
Invoke mbed compile
, and specify the name of your platform and your favorite toolchain (GCC_ARM
, ARM
, IAR
). For example, for the Arm Compiler 5:
mbed compile -t <toolchain> -m <target>
Example: mbed compile -m K64F -t ARM
You can find more information on the network socket API in the Mbed OS 5 documentation.
You can also find more information on the socket statistic API in the Mbed OS 5 documentation.
The current example is configured to use the Ethernet interface on supported devices. To use the example with a different interface, please follow the socket example readme. Network interfaces are documented in Mbed OS 5 documentation
The software is provided under Apache-2.0 license. Contributions to this project are accepted under the same license. Please see Contributing instructions for more information.
This project contains code from other projects. The original license text is included in those source files. They must comply with our license guide