#include <source/ariba/utility/addressing/tcpip_endpoint.hpp>
Inherits address_convenience< tcpip_endpoint >.
Public Types | |
typedef tcpip_endpoint | self |
Public Member Functions | |
tcpip_endpoint () | |
tcpip_endpoint (const tcpip_endpoint ©) | |
tcpip_endpoint (uint16_t port) | |
tcpip_endpoint (const ip_address &ip, const tcp_port_address &port) | |
tcpip_endpoint (const std::string &ip, const std::string &port) | |
tcpip_endpoint (const std::string &ip, uint16_t port) | |
tcpip_endpoint (const std::string &text) | |
tcpip_endpoint (const char *text) | |
tcpip_endpoint (const uint8_t *bytes, size_t size) | |
bool | assign (const self ©) |
int | compare_to (const self &rhs) const |
implements comparison operators | |
bool | is_bytes_size_static () const |
returns true, if this address has a fixed size in bytes | |
size_t | to_bytes_size () const |
returns the number of bytes used for serialization of this address | |
void | to_bytes (uint8_t *bytes) const |
converts this address to a binary representation | |
bool | assign (const uint8_t *bytes, size_t size) |
Assigns an address using a bunch of bytes. | |
std::string | to_string () const |
convert address to a string that can be used to reconstruct the address | |
bool | assign (const std::string &text) |
Assigns an address using a human-readable. | |
const string & | type_name () const |
returns the name of the address | |
uint16_t | type_id () const |
returns the id of the address | |
ip_address & | address () |
const ip_address & | address () const |
tcp_port_address & | port () |
const tcp_port_address & | port () const |
tcp::endpoint | asio () const |
returns the asio endpoint | |
void | asio (tcp::endpoint &endp) |
sets the asio endpoint | |
Private Attributes | |
ip_address | ip |
tcp_port_address | port_ |
Static Private Attributes | |
static const std::string | protocol_name = "tcp-ip" |
Definition at line 31 of file tcpip_endpoint.hpp.
Definition at line 38 of file tcpip_endpoint.hpp.
ariba::addressing::tcpip_endpoint::tcpip_endpoint | ( | ) | [inline] |
Definition at line 41 of file tcpip_endpoint.hpp.
ariba::addressing::tcpip_endpoint::tcpip_endpoint | ( | const tcpip_endpoint & | copy | ) | [inline] |
ariba::addressing::tcpip_endpoint::tcpip_endpoint | ( | uint16_t | port | ) | [inline] |
Definition at line 49 of file tcpip_endpoint.hpp.
ariba::addressing::tcpip_endpoint::tcpip_endpoint | ( | const ip_address & | ip, | |
const tcp_port_address & | port | |||
) | [inline] |
Definition at line 52 of file tcpip_endpoint.hpp.
ariba::addressing::tcpip_endpoint::tcpip_endpoint | ( | const std::string & | ip, | |
const std::string & | port | |||
) | [inline] |
Definition at line 56 of file tcpip_endpoint.hpp.
ariba::addressing::tcpip_endpoint::tcpip_endpoint | ( | const std::string & | ip, | |
uint16_t | port | |||
) | [inline] |
Definition at line 60 of file tcpip_endpoint.hpp.
ariba::addressing::tcpip_endpoint::tcpip_endpoint | ( | const std::string & | text | ) | [inline] |
ariba::addressing::tcpip_endpoint::tcpip_endpoint | ( | const char * | text | ) | [inline] |
ariba::addressing::tcpip_endpoint::tcpip_endpoint | ( | const uint8_t * | bytes, | |
size_t | size | |||
) | [inline] |
const ip_address& ariba::addressing::tcpip_endpoint::address | ( | ) | const [inline] |
ip_address& ariba::addressing::tcpip_endpoint::address | ( | ) | [inline] |
Definition at line 161 of file tcpip_endpoint.hpp.
References ip.
Referenced by ariba::addressing::endpoint_set::add(), ariba::transport::convert(), and ariba::addressing::endpoint_set::remove().
void ariba::addressing::tcpip_endpoint::asio | ( | tcp::endpoint & | endp | ) | [inline] |
sets the asio endpoint
Definition at line 185 of file tcpip_endpoint.hpp.
References ariba::addressing::port_address_tpl< AddressInfo >::asio(), ariba::addressing::ip_address::asio(), ip, and port_.
tcp::endpoint ariba::addressing::tcpip_endpoint::asio | ( | ) | const [inline] |
returns the asio endpoint
Definition at line 180 of file tcpip_endpoint.hpp.
References ariba::addressing::port_address_tpl< AddressInfo >::asio(), ariba::addressing::ip_address::asio(), ip, and port_.
bool ariba::addressing::tcpip_endpoint::assign | ( | const std::string & | text | ) | [inline] |
Assigns an address using a human-readable.
Definition at line 132 of file tcpip_endpoint.hpp.
References ariba::addressing::port_address_tpl< AddressInfo >::assign(), ariba::addressing::ip_address::assign(), ip, and port_.
bool ariba::addressing::tcpip_endpoint::assign | ( | const uint8_t * | bytes, | |
size_t | size | |||
) | [inline] |
Assigns an address using a bunch of bytes.
Definition at line 109 of file tcpip_endpoint.hpp.
References ariba::addressing::port_address_tpl< AddressInfo >::assign(), ariba::addressing::ip_address::assign(), ip, and port_.
bool ariba::addressing::tcpip_endpoint::assign | ( | const self & | copy | ) | [inline] |
Definition at line 76 of file tcpip_endpoint.hpp.
Referenced by tcpip_endpoint(), and ariba::addressing::detail::test().
int ariba::addressing::tcpip_endpoint::compare_to | ( | const self & | rhs | ) | const [inline] |
implements comparison operators
Definition at line 85 of file tcpip_endpoint.hpp.
References ariba::addressing::port_address_tpl< AddressInfo >::compare_to(), ariba::addressing::ip_address::compare_to(), ip, and port_.
bool ariba::addressing::tcpip_endpoint::is_bytes_size_static | ( | ) | const [inline] |
returns true, if this address has a fixed size in bytes
Definition at line 93 of file tcpip_endpoint.hpp.
const tcp_port_address& ariba::addressing::tcpip_endpoint::port | ( | ) | const [inline] |
tcp_port_address& ariba::addressing::tcpip_endpoint::port | ( | ) | [inline] |
Definition at line 169 of file tcpip_endpoint.hpp.
References port_.
Referenced by ariba::addressing::endpoint_set::add(), ariba::transport::convert(), and ariba::addressing::endpoint_set::remove().
void ariba::addressing::tcpip_endpoint::to_bytes | ( | uint8_t * | bytes | ) | const [inline] |
converts this address to a binary representation
Definition at line 103 of file tcpip_endpoint.hpp.
References ip, port_, ariba::addressing::port_address_tpl< AddressInfo >::to_bytes(), ariba::addressing::ip_address::to_bytes(), and ariba::addressing::ip_address::to_bytes_size().
Referenced by ariba::addressing::detail::test().
size_t ariba::addressing::tcpip_endpoint::to_bytes_size | ( | ) | const [inline] |
returns the number of bytes used for serialization of this address
Definition at line 98 of file tcpip_endpoint.hpp.
References ip, port_, ariba::addressing::port_address_tpl< AddressInfo >::to_bytes_size(), and ariba::addressing::ip_address::to_bytes_size().
Referenced by ariba::addressing::detail::test().
std::string ariba::addressing::tcpip_endpoint::to_string | ( | ) | const [inline] |
convert address to a string that can be used to reconstruct the address
Definition at line 124 of file tcpip_endpoint.hpp.
References ariba::addressing::ip_address::asio(), ip, port_, ariba::addressing::port_address_tpl< AddressInfo >::to_string(), and ariba::addressing::ip_address::to_string().
Referenced by boost::hash< ariba::addressing::tcpip_endpoint >::operator()(), and ariba::addressing::detail::test().
uint16_t ariba::addressing::tcpip_endpoint::type_id | ( | ) | const [inline] |
const string& ariba::addressing::tcpip_endpoint::type_name | ( | ) | const [inline] |
returns the name of the address
Definition at line 150 of file tcpip_endpoint.hpp.
References protocol_name.
Definition at line 33 of file tcpip_endpoint.hpp.
Referenced by address(), asio(), assign(), compare_to(), to_bytes(), to_bytes_size(), and to_string().
Definition at line 34 of file tcpip_endpoint.hpp.
Referenced by asio(), assign(), compare_to(), port(), to_bytes(), to_bytes_size(), and to_string().
const std::string ariba::addressing::tcpip_endpoint::protocol_name = "tcp-ip" [static, private] |