Class InetEndpoint

  • public final class InetEndpoint
    extends java.lang.Object
    An external endpoint (host and port) used to connect to a WireGuard Peer.

    Instances of this class are externally immutable.

    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        equals in class java.lang.Object
      • getHost

        public java.lang.String getHost()
      • getPort

        public int getPort()
      • getResolved

        public java.util.Optional<InetEndpoint> getResolved()
        Generate an InetEndpoint instance with the same port and the host resolved using DNS to a numeric address. If the host is already numeric, the existing instance may be returned. Because this function may perform network I/O, it must not be called from the main thread.
        the resolved endpoint, or Optional.empty()
      • hashCode

        public int hashCode()
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object