Interface IPeerConnector

    • Method Detail

      • enqueuePeer

        void enqueuePeer​(PeerConnectInfo peer)
        Queues a peer to be connected
        Parameters:
        peer - the peer to be connected
      • start

        void start()
        Starts the peer connector
      • stop

        void stop()
        Stops the peer connector.
      • getConnectingCount

        int getConnectingCount()
        Gets the amount of peers are pending to be connected.
        Returns:
        The amount of peers which still need to be connected.
      • getConnectingCountFor

        int getConnectingCountFor​(Torrent torrent)
        Calculates how many connections are assigned to the torrent but haven't passed the BitTorrent handshake yet.
        Parameters:
        torrent - The torrent for which connections must be counted.
        Returns:
        The amount of pending peers.