no description

Fork of Middleware by Roberto Herrera

Revision:
0:d1ff330c5128
diff -r 000000000000 -r d1ff330c5128 Ether.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Ether.cpp	Sat Dec 05 17:43:29 2015 +0000
@@ -0,0 +1,40 @@
+/*
+Ether.cpp
+
+Only to improve the clarity of main .cpp
+This don't have any new classes
+
+All the multiple task are here 
+for Smart Room project asked by 
+Gustavo Torres 
+
+Last update by RoHe 16/11/2015
+
+*/
+
+//#include "Ether.h"
+
+/*
+    // Connect to Server
+    TCPSocketConnection socket;
+      while (socket.connect(ECHO_SERVER_ADDRESS, ECHO_SERVER_PORT) < 0) {
+          pc.printf("Unable to connect to (%s) on port (%d)\n\r", ECHO_SERVER_ADDRESS, ECHO_SERVER_PORT);
+         wait(1);
+    }
+    pc.printf("Connected to Server at %s\n\r",ECHO_SERVER_ADDRESS);
+
+    // Send message to server
+    char hello[] = "Hello World";
+    pc.printf("Sending  message to Server : '%s' \n\r",hello);
+    socket.send_all(hello, sizeof(hello) - 1);
+
+    // Receive message from server
+    char buf[256];
+    int n = socket.receive(buf, 256);
+    buf[n] = '\0';
+    pc.printf("Received message from server: '%s'\n\r", buf);
+
+    // Clean up
+    socket.close();
+    eth.disconnect();
+    */
\ No newline at end of file