async def close(self):
        """
        Terminate the ICE agent, ending ICE processing and streams.
        """
        if self.__isClosed:
            return
        self.__isClosed = True
        self.__setSignalingState('closed')

        # stop senders / receivers
        for transceiver in self.__transceivers:
            await transceiver.stop()
        if self.__sctp:
            await self.__sctp.stop()

        # stop transports
        for transceiver in self.__transceivers:
            await transceiver._transport.stop()
            await transceiver._transport.transport.stop()
        if self.__sctp:
            await self.__sctp.transport.stop()
            await self.__sctp.transport.transport.stop()
        self.__updateIceConnectionState()

        # no more events will be emitted, so remove all event listeners
        # to facilitate garbage collection.
        self.remove_all_listeners()
async def close ( self ) : if self . __isClosed : return self . __isClosed = True self . __setSignalingState ( 'closed' ) for transceiver in self . __transceivers : await transceiver . stop ( ) if self . __sctp : await self . __sctp . stop ( ) for transceiver in self . __transceivers : await transceiver . _transport . stop ( ) await transceiver . _transport . transport . stop ( ) if self . __sctp : await self . __sctp . transport . stop ( ) await self . __sctp . transport . transport . stop ( ) self . __updateIceConnectionState ( ) self . remove_all_listeners ( )
Terminate the ICE agent, ending ICE processing and streams.