Network address consisting of an IP4 address and port number.
More...
#include "Network.hpp"
|
| char | IP [4] |
| | The IP number of the network address. More...
|
| |
| unsigned short | Port |
| | The port number of the network address. More...
|
| |
Network address consisting of an IP4 address and port number.
| NetAddressT::NetAddressT |
( |
char |
IP0, |
|
|
char |
IP1, |
|
|
char |
IP2, |
|
|
char |
IP3, |
|
|
unsigned short |
Port_ |
|
) |
| |
Constructor.
- Parameters
-
| IP0 | The first byte of the IP address. |
| IP1 | The second byte of the IP address. |
| IP2 | The third byte of the IP address. |
| IP3 | The fourth byte of the IP address. |
| Port_ | The port of this network adress |
| NetAddressT::NetAddressT |
( |
const char * |
Name, |
|
|
unsigned short |
Port_ |
|
) |
| |
Constructor.
- Parameters
-
| Name | Hostname from which the network address should be created. |
| Port_ | The port of this network address. |
- Exceptions
-
| NetAddressT::NetAddressT |
( |
const std::string & |
Name, |
|
|
unsigned short |
Port_ |
|
) |
| |
Constructor.
- Parameters
-
| Name | Hostname from which the network address should be created. |
| Port_ | The port of this network address. |
- Exceptions
-
| NetAddressT::NetAddressT |
( |
const sockaddr_in & |
SockAddrIn | ) |
|
Constructor.
- Parameters
-
| SockAddrIn | sockaddr_in stuct from which this network address is created. |
| bool NetAddressT::operator!= |
( |
const NetAddressT & |
Address | ) |
const |
Compares two network addresses.
- Parameters
-
| Address | The address to compare to. |
- Returns
- 'true' if the addresses are different.
| bool NetAddressT::operator== |
( |
const NetAddressT & |
Address | ) |
const |
Compares two network addresses.
- Parameters
-
| Address | The address to compare to. |
- Returns
- 'true' if the addresses are the same.
| sockaddr_in NetAddressT::ToSockAddrIn |
( |
| ) |
const |
Converts the network address into a sockaddr_in struct.
- Returns
- The network address as sockaddr_in.
| const char * NetAddressT::ToString |
( |
| ) |
const |
Converts the network address into a string.
- Returns
- The network address in string format.
The IP number of the network address.
| unsigned short NetAddressT::Port |
The port number of the network address.
The documentation for this class was generated from the following files: