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);