Package nxt.util

Class UPnP


  • public class UPnP
    extends java.lang.Object
    Forward ports using the UPnP protocol.
    • Constructor Summary

      Constructors 
      Constructor Description
      UPnP()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addPort​(int port)
      Add a port to the UPnP mapping
      static void deletePort​(int port)
      Delete a port from the UPnP mapping
      static java.net.InetAddress getExternalAddress()
      Return the external address
      static java.net.InetAddress getLocalAddress()
      Return the local address
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UPnP

        public UPnP()
    • Method Detail

      • addPort

        public static void addPort​(int port)
        Add a port to the UPnP mapping
        Parameters:
        port - Port to add
      • deletePort

        public static void deletePort​(int port)
        Delete a port from the UPnP mapping
        Parameters:
        port - Port to delete
      • getLocalAddress

        public static java.net.InetAddress getLocalAddress()
        Return the local address
        Returns:
        Local address or null if the address is not available
      • getExternalAddress

        public static java.net.InetAddress getExternalAddress()
        Return the external address
        Returns:
        External address or null if the address is not available