Package dev.omega24.upnp4j.gateway
Class Gateway
java.lang.Object
dev.omega24.upnp4j.gateway.Gateway
A gateway that we can connect to
-
Method Summary
Modifier and TypeMethodDescriptionbooleanCloses a port using UPnPGets the external IP of the routerGets the local IP of the routerbooleanChecks if a port is openbooleanOpens a port using UPnP
-
Method Details
-
getExternalIP
Gets the external IP of the router- Returns:
- The external IP of the router
-
getLocalIP
Gets the local IP of the router- Returns:
- The local IP of the router
-
openPort
Opens a port using UPnP- Parameters:
port- A port in the range of 1-65535protocol- The protocol to open the port with- Returns:
- True if the port was able to open
-
closePort
Closes a port using UPnP- Parameters:
port- A port in the range of 1-65535protocol- The protocol to close the port with- Returns:
- True if the port was able to close
-
isOpen
Checks if a port is open- Parameters:
port- A port in the range of 1-65535protocol- The protocol to check the port with- Returns:
- True if the port is open
-