...
This commit is contained in:
@@ -18,7 +18,8 @@ class AdcDeviceNetServerASIO : public AdcDeviceNetServer
|
||||
{
|
||||
public:
|
||||
template <traits::adc_input_char_range R>
|
||||
AdcDeviceNetServerASIO(const R& id, asio::io_context& io_context) : AdcDeviceNetServer(id), _ioContext(io_context)
|
||||
AdcDeviceNetServerASIO(const R& id, asio::io_context& io_context)
|
||||
: AdcDeviceNetServer(id), _ioContext(io_context), _stopSignal(io_context), _restartSignal(io_context)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -53,10 +54,10 @@ public:
|
||||
asio::local::stream_protocol::endpoint ept(endpoint.template path<std::string>());
|
||||
using srv_t = AdcNetServiceASIO<asio::local::stream_protocol, SessProtoT>;
|
||||
AdcDeviceNetServer::start<Session<srv_t>>("LOCAL STREAM", this, _ioContext, ept);
|
||||
} else if (endpoint.isLocalDatagram()) {
|
||||
asio::local::datagram_protocol::endpoint ept(endpoint.template path<std::string>());
|
||||
using srv_t = AdcNetServiceASIO<asio::local::datagram_protocol, SessProtoT>;
|
||||
AdcDeviceNetServer::start<Session<srv_t>>("LOCAL DGRAM", this, _ioContext, ept);
|
||||
// } else if (endpoint.isLocalDatagram()) {
|
||||
// asio::local::datagram_protocol::endpoint ept(endpoint.template path<std::string>());
|
||||
// using srv_t = AdcNetServiceASIO<asio::local::datagram_protocol, SessProtoT>;
|
||||
// AdcDeviceNetServer::start<Session<srv_t>>("LOCAL DGRAM", this, _ioContext, ept);
|
||||
} else if (endpoint.isLocalSeqpacket()) {
|
||||
asio::local::seq_packet_protocol::endpoint ept(endpoint.template path<std::string>());
|
||||
using srv_t = AdcNetServiceASIO<asio::local::seq_packet_protocol, SessProtoT>;
|
||||
@@ -70,7 +71,7 @@ public:
|
||||
// some default endpoint?!!
|
||||
void start() {}
|
||||
|
||||
template <std::ranges::range RST, std::ranges::range RRT>
|
||||
template <std::ranges::range RST = std::vector<int>, std::ranges::range RRT = std::vector<int>>
|
||||
void setupSignals(const RST& stop_sig_num = std::vector<int>{SIGINT, SIGTERM},
|
||||
const RRT& restart_sig_num = std::vector<int>{SIGUSR1})
|
||||
requires(std::convertible_to<std::ranges::range_value_t<RST>, int> &&
|
||||
|
||||
Reference in New Issue
Block a user