-
Notifications
You must be signed in to change notification settings - Fork 0
websocketpp::endpoint
Note: this is a draft article from the 0.2.0 documentation that I am using to test wiki formatting.
An endpoint manages a list of active connections. Endpoint is a host template class with three policies. role and socket are enriched policies whose public member functions appear in endpoint’s interface. The interface described here represents only that of the host class. Please refer to the documentation for the policies you are using for the complete endpoint interface
template <
template <class> class role,
template <class> class socket = socket::plain,
template <class> class logger = log::logger>
class endpoint;
Most of the types available in endpoint are aliases of those in its traits class endpoint_traits. If you just need those types (eg for a handler you can include only the traits class TODO)
Name | Description |
alogger_type | the type of the access logger |
elogger_type | the type of the error logger |
handler_ptr | the type of the abstract base class interface that handlers for this endpoint must implement |
Name | Signature | Description |
endpoint | endpoint(handler_ptr) |
constructor |
alog | alogger_type& alog() |
returns a reference to the access logger |
elog | elogger_type& elog() |
returns a reference to the error logger |
endpoint is friends with its role and socket base classes so that these CRTP classes can call protected members without leaking them into the public interface.
TODO
All built in policies for endpoint will have the same thread safety features. Third party policies need not.
Distinct Objects: safe
Shared Objects: will be safe when complete.
websocketpp/endpoint.hpp
boost_system