lpc1768-picotcp-eth to revision 8, PicoTCP to revision 41 (mbed-rtos to revision 12, mbed to revision 63)
Dependencies: PicoTCP lpc1768-picotcp-eth mbed-rtos mbed
Fork of TCPSocket_HelloWorld_PicoTCP by
Revision 1:e2652bd064c6, committed 2012-06-26
- Comitter:
- donatien
- Date:
- Tue Jun 26 15:34:26 2012 +0000
- Parent:
- 0:bb128f0e952f
- Child:
- 2:e087e9b789e9
- Commit message:
- Switched from uint8_t* to char* for data type
Changed in this revision
EthernetInterface.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 |
--- a/EthernetInterface.lib Tue Jun 26 14:39:21 2012 +0000 +++ b/EthernetInterface.lib Tue Jun 26 15:34:26 2012 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/EthernetInterface/#f5776537f27f +http://mbed.org/users/mbed_official/code/EthernetInterface/#c50597f8d7a2
--- a/main.cpp Tue Jun 26 14:39:21 2012 +0000 +++ b/main.cpp Tue Jun 26 15:34:26 2012 +0000 @@ -11,15 +11,15 @@ TCPSocket sock; sock.connect("mbed.org", 80); - const char http_cmd[] = "GET /media/uploads/donatien/hello.txt HTTP/1.1\r\nHost: %s\r\n\r\n"; - sock.send((std::uint8_t*)http_cmd, sizeof(http_cmd) - 1, 3000); + char http_cmd[] = "GET /media/uploads/donatien/hello.txt HTTP/1.1\r\nHost: %s\r\n\r\n"; + sock.send(http_cmd, sizeof(http_cmd) - 1, 3000); char in_buf[256]; bool firstIteration = true; int ret; do { - ret = sock.receive((std::uint8_t*)in_buf, 255, firstIteration?3000:0); + ret = sock.receive(in_buf, 255, firstIteration?3000:0); in_buf[ret] = '\0'; printf("Received %d chars from server: %s\n", ret, in_buf);