diff --git a/net/adc_netserver.h b/net/adc_netserver.h index f1ae490..b4ac0df 100644 --- a/net/adc_netserver.h +++ b/net/adc_netserver.h @@ -267,6 +267,7 @@ public: std::function onOpen; std::function onClose; std::function)> onData; + std::function onError; }; @@ -277,6 +278,8 @@ public: { } + void stop() {} + protected: ServerControls _serverControls; }; diff --git a/net/uwebsockets/adc_netservice_uws.h b/net/uwebsockets/adc_netservice_uws.h index 55a57d5..2f08e9a 100644 --- a/net/uwebsockets/adc_netservice_uws.h +++ b/net/uwebsockets/adc_netservice_uws.h @@ -43,10 +43,7 @@ public: template TokenT> auto asyncAccept(TokenT&& token, const traits::adc_time_duration_c auto& timeout = DEFAULT_ACCEPT_TIMEOUT) { - _uwsApp.ws("/*", {.open = [wrapper = traits::adc_pf_wrapper(std::forward(token)), this](auto) { - std::get<0>(wrapper)(std::error_code{}, std::make_shared(_uwsApp)); - }}); - + // just call listen method _uwsApp.listen(_endpoint.first, _endpoint.second, [wrapper = traits::adc_pf_wrapper(std::forward(token)), this](auto* sock) { std::error_code ec; @@ -57,6 +54,12 @@ public: }); } + template + auto accept(const DT& timeout = DEFAULT_ACCEPT_TIMEOUT) + { + } + + private: uWS::SSLApp& _uwsApp;