Class SocketAddress

    • Method Detail

      • tcp_ip_v4

        public static SocketAddress tcp_ip_v4​(byte[] addr,
                                              short port)
        Utility method to constructs a new TcpIpV4-variant SocketAddress
      • tcp_ip_v6

        public static SocketAddress tcp_ip_v6​(byte[] addr,
                                              short port)
        Utility method to constructs a new TcpIpV6-variant SocketAddress
      • onion_v2

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

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

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

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

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