TCP Socket Hello World with Ethernet

Dependencies:   mbed mbed-rtos EthernetInterface

Dependents:   PLC_client lanGpio_2v0

mbed 2 and mbed OS 5

This is an mbed 2 example. For an mbed-os example, please see:

[Repository '/teams/mbed-os-examples/code/mbed-os-example-sockets/docs/tip/' not found]

Revision:
11:59dcefdda506
Parent:
9:4757a976148d
--- a/main.cpp	Wed Aug 01 13:32:17 2012 +0000
+++ b/main.cpp	Fri Aug 10 09:41:51 2012 +0000
@@ -11,7 +11,7 @@
     sock.connect("mbed.org", 80);
     
     char http_cmd[] = "GET /media/uploads/mbed_official/hello.txt HTTP/1.0\n\n";
-    sock.send_all(http_cmd, sizeof(http_cmd));
+    sock.send_all(http_cmd, sizeof(http_cmd)-1);
     
     char buffer[300];
     int ret;