Socket::close() now supports an additional parameter for defining the shutdown type

Fork of Socket by mbed official

Revision:
20:6bf8566b40c8
Parent:
17:c5089d058eab
--- a/Socket.cpp	Mon Aug 19 18:38:18 2013 +0300
+++ b/Socket.cpp	Thu Mar 05 20:55:36 2015 +0000
@@ -69,12 +69,12 @@
     return select(&timeout._time, false, true);
 }
 
-int Socket::close(bool shutdown) {
+int Socket::close(bool shutdown, int shutdown_type) {
     if (_sock_fd < 0)
         return -1;
     
     if (shutdown)
-        lwip_shutdown(_sock_fd, SHUT_RDWR);
+        lwip_shutdown(_sock_fd, shutdown_type);
     lwip_close(_sock_fd);
     _sock_fd = -1;