15#include "TcpServer.hpp"
48template<DerivedFromTcpSession T>
64 TcpServer & server, std::chrono::milliseconds initialTimeout)
override
65 {
return std::make_shared<T>(std::move(host), std::move(serv), server, initialTimeout); }
Convenience TcpServer that instantiates a fixed TcpSession type.
Definition TcpServerForSession.hpp:50
TcpServer(Options options, FdWatch::Poller &poller)
Construct a TCP server bound to a poller.
TcpSessionPtr makeSession(std::string host, std::string serv, TcpServer &server, std::chrono::milliseconds initialTimeout) override
Create a new session of type T for an accepted connection.
Definition TcpServerForSession.hpp:63
TcpServer(Options options, FdWatch::Poller &poller)
Construct a TCP server bound to a poller.
Constrains a type to be derived from dfx::Server::TcpSession.
Definition TcpServerForSession.hpp:21
Definition BaseCommandHandler.hpp:16
std::shared_ptr< TcpSession > TcpSessionPtr
Shared ownership pointer type for sessions.
Definition TcpSession.hpp:227