Package nxt.util
Class UPnP
java.lang.Object
nxt.util.UPnP
Forward ports using the UPnP protocol.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddPort(int port) Add a port to the UPnP mappingstatic voiddeletePort(int port) Delete a port from the UPnP mappingstatic InetAddressReturn the external addressstatic InetAddressReturn the local address
-
Constructor Details
-
UPnP
public UPnP()
-
-
Method Details
-
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
Return the local address- Returns:
- Local address or null if the address is not available
-
getExternalAddress
Return the external address- Returns:
- External address or null if the address is not available
-