#include <conexus/ipv4_ip.h>
Inheritance diagram for Conexus::IPv4::IP:
All child classes such as UDP and TCP inherit the association of a local host address from this class as well as the concept of interface association, multicasting capabilities and of course, ports.
This class also stores an internal address object representing a local interface object. All BSD socket API functions (such as bind) that require a sockaddr_in structure will be provided this internal attribute. Therefore, it is the responsibility of children such as UDP and TCP to make the appropriate modifications to this protected attribute.
Public Types | |
typedef ConexusPointer< IP > | pointer |
Class typedef to smart pointer. | |
Public Member Functions | |
virtual void | bind () throw ( bind_exception ) |
Attempts to bind this socket to the internal address. | |
virtual void | bind (const Conexus::Address &a) throw ( bind_exception ) |
virtual void | connect () throw ( connect_exception ) |
virtual void | connect (const Address &a) throw ( connect_exception ) |
virtual Address & | local_address () |
virtual Address & | remote_address () |
virtual IPAddress & | generic_local_address () |
virtual IPAddress & | generic_remote_address () |
virtual void | set_remote_address (const Address &addr) |
virtual void | set_remote_address (uint32_t addr, uint16_t port) |
virtual void | set_remote_address (const std::string &addr, uint16_t port) |
virtual void | unset_remote_address () |
virtual void | set_local_address (const Address &addr) |
virtual void | set_local_address (uint32_t addr, uint16_t port) |
virtual void | set_local_address (const std::string &addr, uint16_t port) |
IP (int type=-1, int protocol=0) | |
Default constructor which sets the socket domain to PF_INET but does not provide a socket type or protocol. | |
virtual void | bind () throw (bind_exception) |
Attempts to bind this socket to the internal address. | |
virtual Address & | local_interface () |
virtual Address & | remote_address () |
virtual IPAddress & | generic_local_interface () |
virtual IPAddress & | generic_remote_address () |
virtual void | set_remote_address (Address addr) |
virtual void | unset_remote_address () |
virtual void | set_local_interface (Address addr) |
virtual const std::string & | object_type () |
IP (int type=-1, int protocol=0) | |
Default constructor which sets the socket domain to PF_INET but does not provide a socket type or protocol. | |
virtual void | bind () throw (bind_exception) |
Attempts to bind this socket to the internal address. | |
virtual Address & | local_interface () |
virtual Address & | remote_address () |
virtual IPAddress & | generic_local_interface () |
virtual IPAddress & | generic_remote_address () |
virtual void | set_remote_address (Address addr) |
virtual void | unset_remote_address () |
virtual void | set_local_interface (Address addr) |
virtual const std::string & | object_type () |
Protected Member Functions | |
IP (int type=-1, int protocol=0) | |
Default constructor which sets the socket domain to PF_INET but does not provide a socket type or protocol. | |
virtual void | on_local_address_changed () |
virtual void | on_remote_address_changed () |
void | on_local_address_changed_proxy () |
void | on_remote_address_changed_proxy () |
virtual void | bind (Conexus::Address &a) throw (bind_exception) |
virtual void | on_local_interface_changed (unsigned which) |
virtual void | on_remote_address_changed (unsigned which) |
void | on_local_interface_changed_proxy (unsigned which) |
void | on_remote_address_changed_proxy (unsigned which) |
virtual void | bind (Conexus::Address &a) throw (bind_exception) |
virtual void | on_local_interface_changed (unsigned which) |
virtual void | on_remote_address_changed (unsigned which) |
void | on_local_interface_changed_proxy (unsigned which) |
void | on_remote_address_changed_proxy (unsigned which) |
Protected Attributes | |
Address | m_local_address |
Address | m_remote_address |
bool | m_remote_address_set |
Address | m_local_interface |