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

Committer:
iva2k
Date:
Mon Jun 14 03:24:33 2010 +0000
Revision:
1:3ee499525aa5

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
iva2k 1:3ee499525aa5 1 README.txt.h
iva2k 1:3ee499525aa5 2
iva2k 1:3ee499525aa5 3 TODO LIST:
iva2k 1:3ee499525aa5 4
iva2k 1:3ee499525aa5 5 - HTTP Server performance is ~1-2kB/s. Need way better than this
iva2k 1:3ee499525aa5 6 - Port Ilya's link monitor from old HTTPServer
iva2k 1:3ee499525aa5 7 - Port Ilya's RPC improvements from old HTTPServer
iva2k 1:3ee499525aa5 8 - Port Ilya's NTP service from old HTTPServer
iva2k 1:3ee499525aa5 9 - Fix webfs root for files
iva2k 1:3ee499525aa5 10 - Need more DHCP options (work without link, call DHCP upon link)
iva2k 1:3ee499525aa5 11 - auto index.htm
iva2k 1:3ee499525aa5 12 - Fix headers on 404, RPC, other pages
iva2k 1:3ee499525aa5 13 - Date of files in Headers? Cache control headers
iva2k 1:3ee499525aa5 14 - StreamServer abstraction for request handler (mostly for API for custom protocol handlers)
iva2k 1:3ee499525aa5 15
iva2k 1:3ee499525aa5 16
iva2k 1:3ee499525aa5 17 INFO
iva2k 1:3ee499525aa5 18 - Based on Donatien Garnier's "Net" code v1.00
iva2k 1:3ee499525aa5 19 http://mbed.org/users/donatien/programs/NetServicesSource
iva2k 1:3ee499525aa5 20 - HTTPServer
iva2k 1:3ee499525aa5 21 - Ilya's StreamServer.h/.cpp provide simple TCP streaming service
iva2k 1:3ee499525aa5 22 - Misc Changes:
iva2k 1:3ee499525aa5 23 - Compilation errors fixed
iva2k 1:3ee499525aa5 24 - Debug messages cleaned up (no leading /r/n, better tie-in for LWIP messages)
iva2k 1:3ee499525aa5 25 -
iva2k 1:3ee499525aa5 26
iva2k 1:3ee499525aa5 27 ##END