Class PeerItemFactory

java.lang.Object
com.biglybt.core.peermanager.peerdb.PeerItemFactory

public class PeerItemFactory extends Object
  • Field Details

  • Constructor Details

    • PeerItemFactory

      public PeerItemFactory()
  • Method Details

    • initialise

      public static void initialise()
    • createPeerItem

      public static PeerItem createPeerItem(String address, int tcp_port, byte source, byte handshake_type, int udp_port, byte crypto_level, int up_speed)
      Create a peer item using the given peer address and port information.
      Parameters:
      address - of peer
      source - this peer info was obtained from
      port - of peer
      Returns:
      peer
    • createPeerItem

      public static PeerItem createPeerItem(byte[] serialization, byte source, byte handshake_type, int udp_port, String network) throws Exception
      Create a peer item using the given peer raw byte serialization (address and port).
      Parameters:
      serialization - bytes
      source - this peer info was obtained from
      Returns:
      peer
      Throws:
      Exception
    • getDescriptor

      public static PeerDescriptor getDescriptor(PEPeer peer)
    • getDescriptor

      public static PeerDescriptor getDescriptor(Peer peer)