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.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers perf.h Source File

perf.h

00001 /*
00002  * Author: Adam Dunkels <adam@sics.se>
00003  *
00004  */
00005 #ifndef __LWIP_ARCH_PERF_H__
00006 #define __LWIP_ARCH_PERF_H__
00007 
00008 #define PERF_START
00009 #define PERF_STOP(x)
00010 
00011 #define perf_init(fname)
00012 
00013 #if 0
00014 #ifdef __cplusplus
00015 inline
00016 #endif
00017 void perf_init(char *fname) {
00018   return;  
00019 }
00020 #endif
00021 
00022 
00023 #endif /* __LWIP_ARCH_PERF_H__ */