#include <endpointserver.h>
Public Types | |
typedef ConexusPointer < EndpointServer > | pointer |
Public Member Functions | |
virtual | ~EndpointServer () |
sigc::signal< void, Endpoint::pointer > | signal_new_endpoint () |
Connect to this signal to receive notifications of new endpoints created by this endpoint server. | |
Protected Member Functions | |
EndpointServer () | |
virtual void | queue_endpoint (Endpoint::pointer endpoint) |
void | emit () |
Protected Attributes | |
sigc::signal< void, Endpoint::pointer > | m_signal_new_endpoint |
std::queue< Endpoint::pointer > | m_endpoint_queue |
Glib::Mutex | m_mutex_signal_endpoint |
Glib::Mutex | m_mutex_endpoint_queue |
Glib::Dispatcher * | m_dispatcher |
sigc::connection | m_dispatcher_connection |
This is in contrast to the DataServer which generates data as a result of operation.
The canonical example of an EndpointServer is a TCP server which as a result of operation generates accepted TCP connections. Thus, the TCP server is the EndpointServer, while the accepted TCP connections are DataServers.
typedef ConexusPointer<EndpointServer> Conexus::EndpointServer::pointer |
Reimplemented from Conexus::Server.
Reimplemented in Conexus::IPv4::TCPServer, Conexus::IPv6::TCPServer, Conexus::SSL::IPv4::TCPServer, and Conexus::SSL::IPv6::TCPServer.
Conexus::EndpointServer::EndpointServer | ( | ) | [protected] |
Conexus::EndpointServer::~EndpointServer | ( | ) | [virtual] |
References Conexus::Server::m_running, and Conexus::Server::stop().
void Conexus::EndpointServer::emit | ( | ) | [protected, virtual] |
Implements Conexus::Server.
References m_endpoint_queue, m_mutex_endpoint_queue, m_mutex_signal_endpoint, and m_signal_new_endpoint.
Referenced by queue_endpoint().
void Conexus::EndpointServer::queue_endpoint | ( | Endpoint::pointer | endpoint | ) | [protected, virtual] |
sigc::signal< void, Endpoint::pointer > Conexus::EndpointServer::signal_new_endpoint | ( | ) |
Connect to this signal to receive notifications of new endpoints created by this endpoint server.
References m_signal_new_endpoint.
Glib::Dispatcher* Conexus::EndpointServer::m_dispatcher [protected] |
sigc::connection Conexus::EndpointServer::m_dispatcher_connection [protected] |
std::queue<Endpoint::pointer> Conexus::EndpointServer::m_endpoint_queue [protected] |
Referenced by emit(), and queue_endpoint().
Glib::Mutex Conexus::EndpointServer::m_mutex_endpoint_queue [protected] |
Referenced by emit(), and queue_endpoint().
Glib::Mutex Conexus::EndpointServer::m_mutex_signal_endpoint [protected] |
Referenced by emit(), and queue_endpoint().
sigc::signal<void, Endpoint::pointer> Conexus::EndpointServer::m_signal_new_endpoint [protected] |
Referenced by emit(), and signal_new_endpoint().