Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetInterface mbed-rtos mbed
Revision 2:f6177f2fc898, committed 2015-07-21
- Comitter:
- wolfSSL
- Date:
- Tue Jul 21 11:42:01 2015 +0000
- Parent:
- 1:81dead2c2744
- Child:
- 3:8be99be7f325
- Commit message:
- minor fixes
Changed in this revision
| client-tcp.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/client-tcp.cpp Mon Jul 20 08:27:37 2015 +0000
+++ b/client-tcp.cpp Tue Jul 21 11:42:01 2015 +0000
@@ -79,7 +79,7 @@
ret = getline("Message for server: ", sendBuff, MAXDATASIZE);
printf("Send[%d]:\n%s\n", ret, sendBuff) ;
- if ((ret = socket->send(sendBuff, strlen(sendBuff)-1)) < 0) {
+ if ((ret = socket->send(sendBuff, strlen(sendBuff))) < 0) {
printf("Send error: %i", ret);
return EXIT_FAILURE;
}
@@ -118,7 +118,7 @@
getline("Server Port: ", server_port, sizeof(server_port)) ;
while (socket.connect(server_addr, atoi(server_port)) < 0) {
- printf("Unable to connect to (%s) on port (%d)\n", server_addr, server_port);
+ printf("Unable to connect to (%s) on port (%s)\n", server_addr, server_port);
wait(1.0);
}
printf("TCP Connected\n") ;