|
PIP
1.8.0
Platform-Independent Primitives
|
IPv4 network address, IP and port. More...
Public Member Functions | |
| Address (uint ip=0, ushort port=0) | |
| Contructs Address with binary representation of IP and port. | |
| Address (const PIString &ip_port) | |
| Contructs Address with string representation "i.i.i.i:p". | |
| Address (const PIString &ip, ushort port) | |
| Contructs Address with IP string representation "i.i.i.i" and port. | |
| uint | ip () const |
| Returns binary IP. | |
| ushort | port () const |
| Returns port. | |
| PIString | ipString () const |
| Returns string IP. | |
| PIString | toString () const |
| Returns string representation of IP and port "i.i.i.i:p". | |
| void | setIP (uint ip) |
| Set address IP. | |
| void | setIP (const PIString &ip) |
| Set address IP. | |
| void | setPort (ushort port) |
| Set address port. | |
| void | set (const PIString &ip_port) |
| Set address IP and port, "i.i.i.i:p". | |
| void | set (const PIString &ip, ushort port) |
| Set address IP and port, "i.i.i.i". | |
| void | set (uint ip, ushort port) |
| Set address binary IP and port. | |
| void | clear () |
| Set IP and port to 0. | |
| bool | isNull () const |
| Returns if IP and port is 0. | |
Static Public Member Functions | |
| static Address | resolve (const PIString &host_port) |
| Resolve hostname "host:port" and return it address or null address on error. | |
| static Address | resolve (const PIString &host, ushort port) |
| Resolve hostname "host" with port "port" and return it address or null address on error. | |
IPv4 network address, IP and port.