Class PeerItemFactory


  • public class PeerItemFactory
    extends java.lang.Object
    • Constructor Detail

      • PeerItemFactory

        public PeerItemFactory()
    • Method Detail

      • createPeerItem

        public static PeerItem createPeerItem​(java.lang.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
        port - of peer
        source - this peer info was obtained from
        Returns:
        peer
      • createPeerItem

        public static PeerItem createPeerItem​(byte[] serialization,
                                              byte source,
                                              byte handshake_type,
                                              int udp_port,
                                              java.lang.String network)
                                       throws java.lang.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:
        java.lang.Exception