From edb8f4a3aeb07a87f5682387574434eecf78a0c9 Mon Sep 17 00:00:00 2001 From: "Timur A. Fatkhullin" Date: Tue, 15 Oct 2024 22:45:33 +0300 Subject: [PATCH] ... --- CMakeLists.txt | 6 ++++-- net/adc_device_netserver.h | 22 ++++++++++++++++++++++ net/adc_netserver.h | 2 +- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 net/adc_device_netserver.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 41ab249..89e5f0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,8 @@ set(ADC_NETWORK_HEADERS net/adc_netservice.h net/adc_endpoint.h net/adc_netserver.h + net/adc_net_concepts.h + net/adc_device_netmsg.h ) @@ -40,8 +42,8 @@ if (ASIO_LIBRARY) find_package(ASIO REQUIRED) set(ADC_NETWORK_HEADERS ${ADC_NETWORK_HEADERS} - net/adc_netservice_asio.h - net/adc_netsession_asio.h + net/asio/adc_netservice_asio.h + net/asio/adc_netsession_asio.h ) add_compile_definitions(PUBLIC USE_ASIO_LIBRARY) diff --git a/net/adc_device_netserver.h b/net/adc_device_netserver.h new file mode 100644 index 0000000..82a7ef3 --- /dev/null +++ b/net/adc_device_netserver.h @@ -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 diff --git a/net/adc_netserver.h b/net/adc_netserver.h index 5d8a634..acab185 100644 --- a/net/adc_netserver.h +++ b/net/adc_netserver.h @@ -244,7 +244,7 @@ protected: template void doAccept(std::shared_ptr 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(id, std::move(srv), sess_ctx); startSession(sess);