...
This commit is contained in:
22
net/adc_device_netserver.h
Normal file
22
net/adc_device_netserver.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include "adc_netserver.h"
|
||||
|
||||
namespace adc
|
||||
{
|
||||
|
||||
|
||||
class AdcDeviceNetServer : public AdcGenericNetServer
|
||||
{
|
||||
public:
|
||||
class Session
|
||||
{
|
||||
public:
|
||||
void start() {}
|
||||
void stop() {}
|
||||
};
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
} // namespace adc
|
||||
@@ -244,7 +244,7 @@ protected:
|
||||
template <typename SessionT, typename AT, typename IDT, typename CTXT>
|
||||
void doAccept(std::shared_ptr<AT> acceptor, const IDT& id, const CTXT& sess_ctx)
|
||||
{
|
||||
acceptor.asyncAccept([acceptor, &id, &sess_ctx, this](auto ec, typename SessionT::netservice_t srv) mutable {
|
||||
acceptor->asyncAccept([acceptor, &id, &sess_ctx, this](auto ec, typename SessionT::netservice_t srv) mutable {
|
||||
if (!ec) {
|
||||
auto sess = std::make_shared<SessionT>(id, std::move(srv), sess_ctx);
|
||||
startSession(sess);
|
||||
|
||||
Reference in New Issue
Block a user