a structure which holds IP address
More...
#include <Socket.h>
a structure which holds IP address
Definition at line 116 of file Socket.h.
◆ IPAddress() [1/4]
agxNet::IPAddress::IPAddress |
( |
| ) |
|
◆ IPAddress() [2/4]
Create IP address specifying exact ip address and port number.
- Parameters
-
h | - IP address. For example, 0x100007f represents "127.0.0.1" IP address value. |
p | - IP port number. |
Definition at line 128 of file Socket.h.
◆ IPAddress() [3/4]
Create IP address specifying exact ip address as 4 bytes and port number.
The ip address can be specified as 4 separate byte values, for example:
a structure which holds IP address
- Parameters
-
h1 | - 1st triplet of IP address. |
h2 | - 2nd triplet of IP address. |
h3 | - 3rd triplet of IP address. |
h4 | - 4th triplet of IP address. |
p | - IP port number. |
Definition at line 145 of file Socket.h.
◆ IPAddress() [4/4]
Create IP address specifying ip address as string and port number.
- Parameters
-
ip | - IP address string. Example: "127.0.0.1". |
p | - IP port number. |
◆ host() [1/2]
- Returns
- a reference to the host id
Definition at line 172 of file Socket.h.
◆ host() [2/2]
- Returns
- a const reference to the host id
Definition at line 169 of file Socket.h.
◆ operator==()
bool agxNet::IPAddress::operator== |
( |
const IPAddress & |
ip | ) |
|
|
inline |
compares two IP addresses for equality.
- Parameters
-
ip | - IP address to compare with. |
- Returns
- true if hosts and ports of the two IP addresses are equal accordingly.
-
false otherwise.
Definition at line 164 of file Socket.h.
◆ port() [1/2]
- Returns
- a reference to the port
Definition at line 178 of file Socket.h.
◆ port() [2/2]
- Returns
- a const reference to the port
Definition at line 175 of file Socket.h.
◆ string()
The documentation for this class was generated from the following file: