(self)
(Potentially) cancel the socket handle.

        A socket handle can have both reader and writer components; a call to
        cancel a socket handle will only be successfull if *both* the reader and
        writer component have been disabled. If either is still active, cancel()
        will be a no-op.
(Potentially) cancel the socket handle.
( Potentially ) cancel the socket handle .
def cancel(self):
        """(Potentially) cancel the socket handle.

        A socket handle can have both reader and writer components; a call to
        cancel a socket handle will only be successfull if *both* the reader and
        writer component have been disabled. If either is still active, cancel()
        will be a no-op.
        """
        if self._reader is None and self._writer is None:
            super().cancel()
            del self._loop._sockets[self._fd]

            libcf.CFRunLoopRemoveSource(self._loop._cfrunloop, self._src, kCFRunLoopCommonModes)
            libcf.CFSocketInvalidate(self._cf_socket)
def cancel ( self ) : if self . _reader is None and self . _writer is None : super ( ) . cancel ( ) del self . _loop . _sockets [ self . _fd ] libcf . CFRunLoopRemoveSource ( self . _loop . _cfrunloop , self . _src , kCFRunLoopCommonModes ) libcf . CFSocketInvalidate ( self . _cf_socket )