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.
Dependents: EthernetInterface EthernetInterface_RSF EthernetInterface EthernetInterface ... more
Diff: Socket.cpp
- Revision:
- 17:c5089d058eab
- Parent:
- 16:2d471deff212
diff -r 2d471deff212 -r c5089d058eab Socket.cpp
--- a/Socket.cpp Fri Mar 01 15:30:16 2013 +0000
+++ b/Socket.cpp Tue May 14 09:48:07 2013 +0000
@@ -69,10 +69,12 @@
return select(&timeout._time, false, true);
}
-int Socket::close() {
+int Socket::close(bool shutdown) {
if (_sock_fd < 0)
return -1;
+ if (shutdown)
+ lwip_shutdown(_sock_fd, SHUT_RDWR);
lwip_close(_sock_fd);
_sock_fd = -1;
