#include <socket_service.h>
Public Member Functions | |
| socket_service (kernel::module &module, std::auto_ptr< datagram_service > datagram_service, const std::string &default_host, const std::string &default_port) | |
| virtual | ~socket_service () |
| void | add_socket (const struct addrinfo *local, const struct addrinfo *peer) |
| void | add_local_sockets (void) |
| void | add_local_sockets (const std::string &addresses) |
| void | add_peer_sockets (void) |
| void | add_peer_sockets (const std::string &addresses) |
Static Public Member Functions | |
| static void | local_options (kernel::module &module, const std::string &addresses) |
| static void | peer_options (kernel::module &module, const std::string &addresses) |
Private Member Functions | |
| socket_service (const socket_service &) | |
| socket_service & | operator= (const socket_service &) |
Private Attributes | |
| std::auto_ptr< datagram_service > | _datagram_service |
| std::string | _default_host |
| std::string | _default_port |
| event::handler_service | _handler_service |
This class manages a set of UDP sockets.
Definition at line 49 of file socket_service.h.
| scalestack::network::ip::udp::socket_service::socket_service | ( | kernel::module & | module, | |
| std::auto_ptr< datagram_service > | datagram_service, | |||
| const std::string & | default_host, | |||
| const std::string & | default_port | |||
| ) |
Constructor for the socket service.
| [in] | module | Module that the service is associated with. |
| [in] | datagram_service | Datagram service to associate with this service. This providers the generic datagram objects to pair with datagram providers. |
| [in] | default_host | Default host to use for local binding. |
| [in] | default_port | Default port to use for peer addresses. |
Definition at line 92 of file socket_service.cc.
| scalestack::network::ip::udp::socket_service::~socket_service | ( | ) | [virtual] |
Definition at line 104 of file socket_service.cc.
| scalestack::network::ip::udp::socket_service::socket_service | ( | const socket_service & | ) | [private] |
Don't allow copying of objects.
| void scalestack::network::ip::udp::socket_service::local_options | ( | kernel::module & | module, | |
| const std::string & | addresses | |||
| ) | [static] |
Add common options for local UDP sockets.
| [in] | module | Module that the service is associated with. |
| [in] | addresses | Default address list to use. |
Definition at line 78 of file socket_service.cc.
| void scalestack::network::ip::udp::socket_service::peer_options | ( | kernel::module & | module, | |
| const std::string & | addresses | |||
| ) | [static] |
Add common options for peer UDP sockets.
| [in] | module | Module that the service is associated with. |
| [in] | addresses | Default address list to use. |
Definition at line 85 of file socket_service.cc.
| void scalestack::network::ip::udp::socket_service::add_socket | ( | const struct addrinfo * | local, | |
| const struct addrinfo * | peer | |||
| ) |
Create a new UDP socket and bind to the given address.
| [in] | local | Local address to bind to. |
| [in] | peer | Default peer address to send to. |
Definition at line 109 of file socket_service.cc.
| void scalestack::network::ip::udp::socket_service::add_local_sockets | ( | void | ) |
Add sockets specified by the 'addresses' variable in the module options and bind to those addresses.
Definition at line 152 of file socket_service.cc.
| void scalestack::network::ip::udp::socket_service::add_local_sockets | ( | const std::string & | addresses | ) |
Add sockets specified by the given 'addresses' parameter.
Definition at line 157 of file socket_service.cc.
| void scalestack::network::ip::udp::socket_service::add_peer_sockets | ( | void | ) |
Add sockets specified by the 'addresses' variable in the module options and use those addresses as peers.
Definition at line 172 of file socket_service.cc.
| void scalestack::network::ip::udp::socket_service::add_peer_sockets | ( | const std::string & | addresses | ) |
Add sockets specified by the given 'addresses' parameter.
Definition at line 177 of file socket_service.cc.
| socket_service& scalestack::network::ip::udp::socket_service::operator= | ( | const socket_service & | ) | [private] |
Don't allow assignment of objects.
std::auto_ptr<datagram_service> scalestack::network::ip::udp::socket_service::_datagram_service [private] |
Definition at line 132 of file socket_service.h.
std::string scalestack::network::ip::udp::socket_service::_default_host [private] |
Definition at line 133 of file socket_service.h.
std::string scalestack::network::ip::udp::socket_service::_default_port [private] |
Definition at line 134 of file socket_service.h.
Definition at line 135 of file socket_service.h.
1.6.3