Echo Server based on the legacy EthernetNetIf libraries used for a performance comparison with the new networking libraries

Dependencies:   EthernetNetIf mbed

Fork of EchoServer by ryosuke kojima

Revision:
1:7b4661a721c1
Parent:
0:fcd581e3ad7d
diff -r fcd581e3ad7d -r 7b4661a721c1 main.cpp
--- a/main.cpp	Mon Jun 13 06:47:43 2011 +0000
+++ b/main.cpp	Wed Aug 01 16:25:14 2012 +0000
@@ -22,7 +22,6 @@
 */
 int main() {
     printf("\r\nSetting up...\r\n");
-    /*
     //use DHCP
     
     // Our Ethernet interface
@@ -33,18 +32,10 @@
         return -1;
     }
     IpAddr ip = eth.getIp();
-    */
-    IpAddr ip(192,168,0,100);// = eth.getIp();
-    EthernetNetIf eth(ip,IpAddr(255,255,255,0),IpAddr(192,168,0,1),IpAddr(192,168,0,1));
-    EthernetErr ethErr = eth.setup();
-    if (ethErr) {
-        printf("Error %d in setup.\n", ethErr);
-        return -1;
-    }
     
     printf("mbed IP Address is %d.%d.%d.%d\r\n", ip[0], ip[1], ip[2], ip[3]);
 
-    server.bind(777,666);
+    server.bind(7,7);
 
     printf("Entering while loop Net::poll()ing\r\n");
     while (1) {