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: EthernetNetIf SimpleSocket 1.0 mbed
Diff: Example/echoserver.cpp
- Revision:
- 11:04c0acd7f510
- Parent:
- 10:62ce72ee3e91
- Child:
- 12:52170a866d4a
diff -r 62ce72ee3e91 -r 04c0acd7f510 Example/echoserver.cpp
--- a/Example/echoserver.cpp Thu Aug 18 08:46:47 2011 +0000
+++ b/Example/echoserver.cpp Thu Aug 18 09:51:08 2011 +0000
@@ -12,12 +12,12 @@
timer.start();
while (true) {
- if (ClientSocket *socket = server.accept()) {
- while (socket->connected()) {
+ if (ClientSocket *clientSocket = server.accept()) {
+ while (clientSocket->connected()) {
char buf[8];
- int len = socket->read(buf, sizeof(buf));
+ int len = clientSocket->read(buf, sizeof(buf));
if (len > 0)
- socket->write(buf, len);
+ clientSocket->write(buf, len);
if (timer.read() > 10) {
timer.reset();