def internal_shutdown(s, how): cancel_wait(s._sock.fileno()) s._sock.shutdown(how)
def shutdown(self, how): cancel_wait(self._sock.fileno()) self._sock.shutdown(how)
def internal_close(s): cancel_wait(s._sock.fileno()) s._sock = _closedsocket() dummy = s._sock._dummy for method in _delegate_methods: setattr(s, method, dummy)
def close(self): cancel_wait(self._sock.fileno()) self._sock = _closedsocket() dummy = self._sock._dummy for method in _delegate_methods: setattr(self, method, dummy)