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