Package nxt.util
Class UPnP
- java.lang.Object
-
- nxt.util.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 mappingstatic void
deletePort(int port)
Delete a port from the UPnP mappingstatic java.net.InetAddress
getExternalAddress()
Return the external addressstatic java.net.InetAddress
getLocalAddress()
Return the local address
-
-
-
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
-
-