The PortManager may be used to determine available ports and store the information about ports occupied by the PortManager.
More...
#include "PortManager.h"
The PortManager may be used to determine available ports and store the information about ports occupied by the PortManager.
◆ addPortRange() [1/2]
void PortManager::addPortRange |
( |
const PortRange & | _range | ) |
|
Adds the port range to be used to determine available ports.
- Parameters
-
◆ addPortRange() [2/2]
Adds the port range to be used to determine available ports.
- Note
- Note that the port number must not exceed 49,151.
- Parameters
-
_from | Starting port. |
_to | Final port. |
◆ determineAndBlockAvailablePort()
ot::port_t PortManager::determineAndBlockAvailablePort |
( |
void | | ) |
|
Determines the next available port and stores its information. The PortManager will determine the next available port. If a port was found, the port number will be saved as a "port in use".
◆ instance()
Returns the global instance.
◆ isPortInUse()
bool PortManager::isPortInUse |
( |
ot::port_t | _portNumber | ) |
|
Returns true if the provided port is occupied.
◆ setPortNotInUse()
void PortManager::setPortNotInUse |
( |
ot::port_t | _portNumber | ) |
|
Set the specified port as "not in use".
- Parameters
-
_portNumber | Port to unset. |
◆ ~PortManager()
PortManager::~PortManager |
( |
| ) |
|
|
privatevirtual |
The documentation for this class was generated from the following files: