...
This commit is contained in:
@@ -31,33 +31,35 @@ public:
|
||||
}
|
||||
|
||||
|
||||
// may thow here!
|
||||
// may throw here!
|
||||
#ifdef USE_OPENSSL_WITH_ASIO
|
||||
if (endpoint.isTCP() || endpoint.isTLS()) {
|
||||
asio::ip::tcp::endpoint ept(asio::ip::make_address(endpoint.host()), endpoint.port());
|
||||
if (endpoint.isTCP()) {
|
||||
using srv_t = AdcNetServiceASIOBase<asio::ip::tcp, SessProtoT>;
|
||||
using srv_t = AdcNetServiceASIO<asio::ip::tcp, SessProtoT>;
|
||||
AdcDeviceNetServer::start<Session<srv_t>>("TCP", this, _ioContext, ept);
|
||||
} else {
|
||||
using srv_t = AdcNetServiceASIOTLS<asio::ip::tcp, SessProtoT>;
|
||||
AdcDeviceNetServer::start<Session<srv_t>>("TLS", this, _ioContext, ept);
|
||||
}
|
||||
#else
|
||||
if (endpoint.isTCP()) {
|
||||
asio::ip::tcp::endpoint ept(asio::ip::make_address(endpoint.host()), endpoint.port());
|
||||
using srv_t = AdcNetServiceASIOBase<asio::ip::tcp, AdcStopSeqSessionProto<>>;
|
||||
using srv_t = AdcNetServiceASIO<asio::ip::tcp, AdcStopSeqSessionProto<>>;
|
||||
AdcDeviceNetServer::start<Session<srv_t>>("TCP", this, _ioContext, ept);
|
||||
#endif
|
||||
} else if (endpoint.isLocal()) {
|
||||
if (endpoint.isLocalStream()) {
|
||||
asio::local::stream_protocol::endpoint ept(endpoint.template path<std::string>());
|
||||
using srv_t = AdcNetServiceASIOBase<asio::local::stream_protocol, SessProtoT>;
|
||||
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 = AdcNetServiceASIOBase<asio::local::datagram_protocol, SessProtoT>;
|
||||
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 = AdcNetServiceASIOBase<asio::local::seq_packet_protocol, SessProtoT>;
|
||||
using srv_t = AdcNetServiceASIO<asio::local::seq_packet_protocol, SessProtoT>;
|
||||
AdcDeviceNetServer::start<Session<srv_t>>("LOCAL SEQPACK", this, _ioContext, ept);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user