Class NetAddress

    • Method Detail

      • ipv4

        public static NetAddress ipv4​(byte[] addr,
                                      short port)
        Utility method to constructs a new IPv4-variant NetAddress
      • ipv6

        public static NetAddress ipv6​(byte[] addr,
                                      short port)
        Utility method to constructs a new IPv6-variant NetAddress
      • onion_v2

        public static NetAddress onion_v2​(byte[] a)
        Utility method to constructs a new OnionV2-variant NetAddress
      • onion_v3

        public static NetAddress onion_v3​(byte[] ed25519_pubkey,
                                          short checksum,
                                          byte version,
                                          short port)
        Utility method to constructs a new OnionV3-variant NetAddress
      • hostname

        public static NetAddress hostname​(Hostname hostname,
                                          short port)
        Utility method to constructs a new Hostname-variant NetAddress
      • eq

        public boolean eq​(NetAddress b)
        Checks if two NetAddresss contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields.
      • write

        public byte[] write()
        Serialize the NetAddress object into a byte array which can be read by NetAddress_read