no description
Fork of Middleware by
Ether.cpp
- Committer:
- Jorge_Beltran
- Date:
- 2015-12-07
- Revision:
- 1:32a08ca33b00
- Parent:
- 0:d1ff330c5128
File content as of revision 1:32a08ca33b00:
/* 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(); */