mbed socket API
Dependents: EthernetInterface EthernetInterface_RSF EthernetInterface EthernetInterface ... more
Deprecated
This is an mbed 2 sockets library. For mbed 5, network sockets have been revised to better support additional network stacks and thread safety here.
Diff: Socket.cpp
- Revision:
- 17:c5089d058eab
- Parent:
- 16:2d471deff212
--- 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;
mbed official


