TCP Multi Client server with Debug Server. Can handle multiple client requests and sends debug messages to a client connected to a different port. Tested on Landtiger and mbed

Dependencies:   EthernetInterface Server TCPDebug mbed-rtos mbed

Fork of ThreadServer by Ivan Shindev

Files at this revision

API Documentation at this revision

Comitter:
lemniskata
Date:
Thu Jun 13 20:01:19 2013 +0000
Child:
1:7f1fe0784e7e
Commit message:
V1. Working

Changed in this revision

EthernetInterface.lib Show annotated file Show diff for this revision Revisions of this file
Server.lib Show annotated file Show diff for this revision Revisions of this file
TCPDebug.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EthernetInterface.lib	Thu Jun 13 20:01:19 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/lemniskata/code/EthernetInterface/#1dfd2c3e099a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Server.lib	Thu Jun 13 20:01:19 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/lemniskata/code/Server/#edde051ab024
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TCPDebug.lib	Thu Jun 13 20:01:19 2013 +0000
@@ -0,0 +1,1 @@
+TCPDebug#c2bfbcc99b65
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Jun 13 20:01:19 2013 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+#include "EthernetInterface.h"
+#include "Server.h"
+#include "Debug.h"
+
+int main (void) {
+   EthernetInterface eth;
+   eth.init(); //Use DHCP
+   eth.connect();
+    
+  int server_port=7;
+  int debug_port=8;
+  
+ initDebug(); //initialize Debug server
+ startDebug(debug_port);  //start the Debug server 
+  while(!isDebugConnected()) //do nothing until a debug client is connected (optional)
+  {
+    wait(0.5);
+  }
+  
+  startServer(server_port); //start server
+  
+ 
+  /* do your thing*/
+ 
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-rtos.lib	Thu Jun 13 20:01:19 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed-rtos/#58b30ac3f00e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Jun 13 20:01:19 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/b3110cd2dd17
\ No newline at end of file