Example program with HTTPServer and sensor data streaming over TCPSockets, using Donatien Garnier's Net APIs and services code on top of LWIP. Files StreamServer.h and .cpp encapsulate streaming over TCPSockets. Broadcast is done by sendToAll(), and all incoming data is echoed back to the client. Echo code can be replaced with some remote control of the streaming interface. See main() that shows how to periodically send some data to all subscribed clients. To subscribe, a client should open a socket at <mbed_ip> port 123. I used few lines in TCL code to set up a quick sink for the data. HTTP files are served on port 80 concurrently to the streaming.
api_msg Struct Reference
This struct contains a function to execute in another thread context and a struct api_msg_msg that serves as an argument for this function. More...
#include <api_msg.h>
Data Fields | |
void(* | function )(struct api_msg_msg *msg) |
function to execute in tcpip_thread context | |
struct api_msg_msg | msg |
arguments for this function |
Detailed Description
This struct contains a function to execute in another thread context and a struct api_msg_msg that serves as an argument for this function.
This is passed to tcpip_apimsg to execute functions in tcpip_thread context.
Definition at line 111 of file api_msg.h.
Field Documentation
void(* function)(struct api_msg_msg *msg) |
struct api_msg_msg msg |
Generated on Tue Jul 12 2022 21:10:27 by 1.7.2