9 #include <ThirdPartyWarningsDisable.h>
12 #include <ThirdPartyWarningsRestore.h>
22 template<
typename SessionType>
27 template<
typename... Arguments>
28 static std::shared_ptr<SessionType>
create(Arguments&&... arguments)
30 return std::shared_ptr<SessionType>(
new SessionType(std::forward<Arguments>(arguments)...));
33 template<
typename Slot>
36 return connectionEstablished.connect(std::forward<Slot>(slot));
39 template<
typename Slot>
42 return errorOccured.connect(std::forward<Slot>(slot));
45 template<
typename Slot>
48 return aboutToBeDestroyed.connect(std::forward<Slot>(slot));
60 connectionEstablished(socket);
70 Signal<void(std::unique_ptr<Socket>&)> connectionEstablished;
72 Signal<void()> aboutToBeDestroyed;
Class template facilitating the definition of asio::Socket generators.
void emitConnectionEstablished(std::unique_ptr< Socket > socket)
SignalConnection observeErrorOccured(Slot &&slot)
static std::shared_ptr< SessionType > create(Arguments &&... arguments)
SignalConnection observeConnectionEstablished(Slot &&slot)
SignalConnection observeAboutToBeDestroyed(Slot &&slot)
void emitErrorOccured(const ErrorCode &ec)
boost::signals2::signal< Signature... > Signal
boost::system::error_code ErrorCode
boost::signals2::connection SignalConnection