code: def shutdown(self, how=socket.SHUT_RDWR):
          
          if self._sock_send is not None:
              self._sock_send.shutdown(how)
          return self.sock.shutdown(how)
docs: Send a shutdown signal for both reading and writing, or whatever
          socket.SHUT_* constant you like.
  
          Shutdown differs from closing in that it explicitly changes the state of
          the socket resource to closed, whereas closing will only decrement the
          number of peers on this end of the socket, since sockets can be a
          resource shared by multiple peers on a single OS. When the number of
          peers reaches zero, the socket is closed, but not deallocated, so you
          still need to call close. (except that this is python and close is
          automatically called on the deletion of the socket)
  
          http://stackoverflow.com/questions/409783/socket-shutdown-vs-socket-close