#include <ORB.H>
|
void | init (int basePortDifferent) |
|
Common class to maintain port offsets The offsetList is a list of integers which represents available port offsets from a network basePort. Each time ORBBase::getPortOffset() is called, the first available port offset is added to the list of used offsets (offsetList) and returned. This class also provides methods for generating the actual TCP, UDP and SSL socket ports from the provided details and the class state. This class also provides a method for generating sensible Zeroc ICE endpoint (and proxy) strings using the ORBBase::generateEndPoint method. The ORBBase::generateEndPoint method is used for both the ORBOriginator and ORBReplicator sides of the network.
Definition at line 101 of file ORB.H.
◆ ORBBase() [1/2]
ORB::ORBBase::ORBBase |
( |
void |
| ) |
|
|
inline |
Constructor using ORB_DEFAULT_BASEPORT as the starting base network port.
Definition at line 113 of file ORB.H.
◆ ORBBase() [2/2]
ORB::ORBBase::ORBBase |
( |
int |
basePortDifferent | ) |
|
|
inline |
◆ generateEndPoint() [1/2]
string ORB::ORBBase::generateEndPoint |
( |
const string & |
transportName, |
|
|
std::string & |
ipAddress, |
|
|
int & |
portOffset |
|
) |
| |
|
inline |
Generates an endpoint string specifying where others will connect to OR what to connect to.
- Parameters
-
transportName | is the name of the application layer property which will provide ORB services |
ipAddress | if not empty, then append the host's ip address (or hostname) to connect to, otherwise, if empty, generate the endpoint string to route to a machine on a network |
portOffset | The offset from the basePort to use |
- Returns
- a suitable end point string
Definition at line 179 of file ORB.H.
◆ generateEndPoint() [2/2]
string ORB::ORBBase::generateEndPoint |
( |
string & |
transportName, |
|
|
string |
ipAddress, |
|
|
int |
portOffset |
|
) |
| |
|
inline |
generates an endpoint string specifying where others will connect to OR what to connect to.
- Parameters
-
transportName | is the name of the application layer property which will provide ORB services |
ipAddress | if not empty, then append the host's ip address (or hostname) to connect to, otherwise, if empty, generate the endpoint string to route to a machine on a network |
portOffset | The offset from the basePort to use |
- Returns
- a suitable end point string
Definition at line 191 of file ORB.H.
◆ getBasePort()
int ORB::ORBBase::getBasePort |
( |
void |
| ) |
|
|
inline |
Get the base port. This base port is the port to connect to on the originator of the network layer
- Returns
- basePort The base port of the system
Definition at line 169 of file ORB.H.
◆ getPortOffset()
int ORB::ORBBase::getPortOffset |
( |
void |
| ) |
|
|
inline |
Get a new port offset to use
- Returns
- an un-used port offset
Definition at line 122 of file ORB.H.
◆ getSSLPort()
int ORB::ORBBase::getSSLPort |
( |
int |
portOffset | ) |
|
|
inline |
Get the SSL port for connection NOTE: currently SSL is not activated in generateEndPoint because it requires a valid cert.
- Parameters
-
portOffset | The portOffset to use |
- Returns
- The SSL port matching the supplied portOffset
Definition at line 161 of file ORB.H.
◆ getTCPUDPPort()
int ORB::ORBBase::getTCPUDPPort |
( |
int |
portOffset | ) |
|
|
inline |
Get the TCP and UDP ports for connection
- Parameters
-
portOffset | The portOffset to use |
- Returns
- The UDP and TCP port matching the supplied portOffset
Definition at line 152 of file ORB.H.
◆ init()
void ORB::ORBBase::init |
( |
int |
basePortDifferent | ) |
|
|
inlineprivate |
initialise the class
- Parameters
-
basePortDifferent | the intended basePort value |
Definition at line 108 of file ORB.H.
◆ removePortOffset()
void ORB::ORBBase::removePortOffset |
( |
int |
whichOffset | ) |
|
|
inline |
Remove a port offset from the offsetList, which will free it up for future use
- Parameters
-
whichOffset | is the port offset to remove from the list if present |
Definition at line 142 of file ORB.H.
◆ basePort
int ORB::ORBBase::basePort |
|
private |
The starting network port.
Definition at line 102 of file ORB.H.
◆ countMutex
IceUtil::Mutex ORB::ORBBase::countMutex |
|
private |
Mutex semaphore to enable the manipulation of the offsetList.
Definition at line 103 of file ORB.H.
◆ offsetList
list<int> ORB::ORBBase::offsetList |
|
private |
The list of port offsets used.
Definition at line 104 of file ORB.H.
The documentation for this class was generated from the following file:
- /tmp/gtkiostream/include/ORB.H