Class STUNResolver.STUNService

    • Constructor Detail

      • STUNService

        public STUNService​(String hostname,
                           int port)
        Basic constructor, with the hostname and port
        Parameters:
        hostname - The hostname
        port - The port
      • STUNService

        public STUNService()
        Default constructor, without name and port.
    • Method Detail

      • getHostname

        public String getHostname()
        Get the host name of the STUN service.
        Returns:
        The host name
      • setHostname

        public void setHostname​(String hostname)
        Set the hostname of the STUN service.
        Parameters:
        hostname - The host name of the service.
      • getPort

        public int getPort()
        Get the port of the STUN service
        Returns:
        The port number where the STUN server is waiting.
      • setPort

        public void setPort​(int port)
        Set the port number for the STUN service.
        Parameters:
        port - The port number.
      • isNull

        public boolean isNull()
        Basic format test: the service is not null.
        Returns:
        true if the hostname and port are null
      • checkBinding

        public boolean checkBinding()
        Check a binding with the STUN currentServer. Note: this function blocks for some time, waiting for a response.
        Returns:
        true if the currentServer is usable.