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 NTPClient mbed-rtos mbed
Revision 1:92d3f1118200, committed 2012-09-27
- Comitter:
- jonathonfletcher
- Date:
- Thu Sep 27 12:14:57 2012 +0000
- Parent:
- 0:5197a41c178f
- Commit message:
- add server_ip and server_port at the top of the example.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Sep 27 12:06:18 2012 +0000
+++ b/main.cpp Thu Sep 27 12:14:57 2012 +0000
@@ -4,6 +4,9 @@
#include "EthernetInterface.h"
#include "NTPClient.h"
+// XXX: Change this to a valid IP of your network.
+const char *server_ip = "10.0.1.253";
+const unsigned short server_port = 8080;
const char *newline = "\r\n";
const unsigned int connection_timeout = 6000;
@@ -51,7 +54,7 @@
printf("%s:%d nmessages:%d%s", __FILE__, __LINE__, nmessages, newline);
if (!socket.is_connected()) {
- socket.connect("10.0.1.253", 8080);
+ socket.connect(server_ip, server_port);
}
printf("%s:%d%s", __FILE__, __LINE__, newline);