A simple place to store and munipulate tcp and port address for communication layer.
More...
#include "socket_address.h"
List of all members.
Public Types |
|
typedef struct sockaddr_in | AddressType |
Public Member Functions |
|
| Socket_Address (const AddressType &inaddr) |
| | Socket_Address (short port=0) |
| | Constructor that lets us set a port value.
|
| | Socket_Address (const Socket_Address &inaddr) |
| | Copy Constructor.
|
| virtual | ~Socket_Address () |
| | Normal Destructor.
|
| void | clear () |
| | Set the internal values to a suitable known value.
|
| std::string | get_ip () const |
| | Return the ip address portion in dot notation string.
|
| std::string | get_ip_port () const |
| | Return the ip address/port in dot notation string.
|
| unsigned short | get_port () const |
| | Get the port portion as an integer.
|
|
AddressType & | GetAddressInfo () |
|
const AddressType & | GetAddressInfo () const |
| unsigned long | GetIPAddressRaw () const |
| | Return a RAW sockaddr_in.
|
| bool | isMcastRange () |
| | return true if the address is in the mcast range.
|
|
bool | operator< (const Socket_Address &in) const |
| bool | operator== (const Socket_Address &in) const |
| | Allow for normal == operation on a address item.
|
| bool | set_any_IP (int port) |
| | Set to any address and a specified port.
|
| bool | set_broadcast (int port) |
| | Set to the broadcast address and a specified port.
|
|
bool | set_host (const std::string &hostname) |
| bool | set_host (const std::string &hostname, int port) |
| | this function will take a port and string-based tcp address and initialize the address with the information
|
|
bool | set_host (unsigned int ip4adr, int port) |
| bool | set_port (int port) |
| | Set to a specified port.
|
Detailed Description
A simple place to store and munipulate tcp and port address for communication layer.
Definition at line 15 of file socket_address.h.
Constructor & Destructor Documentation
| Socket_Address::Socket_Address |
( |
short |
port = 0 | ) |
[inline] |
Constructor that lets us set a port value.
Definition at line 67 of file socket_address.h.
| Socket_Address::Socket_Address |
( |
const Socket_Address & |
inaddr | ) |
[inline] |
| Socket_Address::~Socket_Address |
( |
| ) |
[inline, virtual] |
Member Function Documentation
| void Socket_Address::clear |
( |
| ) |
[inline] |
| std::string Socket_Address::get_ip |
( |
| ) |
const [inline] |
| std::string Socket_Address::get_ip_port |
( |
| ) |
const [inline] |
| unsigned short Socket_Address::get_port |
( |
| ) |
const [inline] |
| unsigned long Socket_Address::GetIPAddressRaw |
( |
| ) |
const [inline] |
| bool Socket_Address::isMcastRange |
( |
void |
| ) |
[inline] |
return true if the address is in the mcast range.
Definition at line 278 of file socket_address.h.
| bool Socket_Address::operator== |
( |
const Socket_Address & |
in | ) |
const [inline] |
Allow for normal == operation on a address item.
Will simplify the use in sorted containers..
Definition at line 104 of file socket_address.h.
| bool Socket_Address::set_any_IP |
( |
int |
port | ) |
[inline] |
| bool Socket_Address::set_broadcast |
( |
int |
port | ) |
[inline] |
| bool Socket_Address::set_host |
( |
const std::string & |
hostname, |
|
|
int |
port |
|
) |
| [inline] |
| bool Socket_Address::set_port |
( |
int |
port | ) |
[inline] |
The documentation for this class was generated from the following file: