C++ IP API
9.5.7
TCP & UDP for virtual user scripts
|
This class encapsulates IP address and port. Static member instances represent common patterns and address families. More...
Public Types | |
enum | AddressType { NONE, ANY, STANDARD, ALL, BROADCAST } |
A low level enumeration used internally. More... | |
Public Methods | |
IpEndPoint () | |
Default constructor. More... | |
IpEndPoint (int port) | |
Construct an IpEndPoint with IP address "127.0.0.1" and the given IP port. More... | |
IpEndPoint (const IpEndPoint &) | |
Copy constructor. More... | |
IpEndPoint (const string &host, int port=0, AddressType addressType=STANDARD) | |
A commonly used constructor. More... | |
IpEndPoint (SOCKADDR_IN &addr) | |
A low level constructor used internally and not called directly by test scripts. More... | |
bool | IpEndPoint::isIPV4 () const |
bool | IpEndPoint::isIPV6 () const |
IpEndPoint & | operator= (const IpEndPoint &other) |
Assignment operator for this class. More... | |
string | toString () const |
| |
IpEndPoint | withPort (int port) const |
Create a new IpEndPoint that differs from this one only by the port attribute. More... | |
Public Properties | |
Read only properties of the object. | |
const string & | host () const |
| |
int | port () const |
| |
AddressType | addressType () const |
| |
bool | isLegal () const |
| |
bool | isAll () const |
| |
bool | isBroadcast () const |
| |
bool | isStandard () const |
| |
Public Static Members | |
static const IpEndPoint | All |
This object and is used in server scripts as in the example. More... | |
static const IpEndPoint | Any |
This object is a "wild card" and used to represent an IP address and port where the actual values used by the low level communication layers will be determined by the Operating System. More... | |
static const IpEndPoint | Broadcast |
static const IpEndPoint | Local |
static const IpEndPoint | None |
This object is the value given to for to an uninitialized variable. More... | |
This class encapsulates IP address and port. Static member instances represent common patterns and address families.
Objects of this class are safe to be copied and re-assigned.
Facilita::IpEndPoint::IpEndPoint | ( | ) |
Default constructor.
Facilita::IpEndPoint::IpEndPoint | ( | int | port | ) |
Construct an IpEndPoint with IP address "127.0.0.1" and the given IP port.
port | Must be non-negative number, being an IP port. 0 is a wild card. |
Facilita::IpEndPoint::IpEndPoint | ( | const IpEndPoint & | ) |
Copy constructor.
Facilita::IpEndPoint::IpEndPoint | ( | const string & | host, |
int | port = 0 , |
||
AddressType | addressType = STANDARD |
||
) |
A commonly used constructor.
host | A string which either requires DNS look up or is a dotted IP address. |
port | A non-negative number, being an IP port. 0 is a wild card. |
addressType | As described by the enumeration, it is usually defaulted. |
Facilita::IpEndPoint::IpEndPoint | ( | SOCKADDR_IN & | addr | ) |
A low level constructor used internally and not called directly by test scripts.
AddressType Facilita::IpEndPoint::addressType | ( | ) | const |
const string& Facilita::IpEndPoint::host | ( | ) | const |
bool Facilita::IpEndPoint::IpEndPoint::isIPV4 | ( | ) | const |
bool Facilita::IpEndPoint::IpEndPoint::isIPV6 | ( | ) | const |
bool Facilita::IpEndPoint::isAll | ( | ) | const |
bool Facilita::IpEndPoint::isBroadcast | ( | ) | const |
bool Facilita::IpEndPoint::isLegal | ( | ) | const |
bool Facilita::IpEndPoint::isStandard | ( | ) | const |
IpEndPoint& Facilita::IpEndPoint::operator= | ( | const IpEndPoint & | other | ) |
Assignment operator for this class.
int Facilita::IpEndPoint::port | ( | ) | const |
string Facilita::IpEndPoint::toString | ( | ) | const |
IpEndPoint Facilita::IpEndPoint::withPort | ( | int | port | ) | const |
Create a new IpEndPoint that differs from this one only by the port attribute.
port | A non-negative number, being the IP port of the newly created object. |
|
static |
This object and is used in server scripts as in the example.
|
static |
This object is a "wild card" and used to represent an IP address and port where the actual values used by the low level communication layers will be determined by the Operating System.
|
static |
|
static |
|
static |
This object is the value given to for to an uninitialized variable.