2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
42#ifndef NET_UN_STREAM_TLS_SOCKETCLIENT_H
43#define NET_UN_STREAM_TLS_SOCKETCLIENT_H
47#include "core/socket/stream/tls/SocketConnection.h"
48#include "core/socket/stream/tls/SocketConnector.h"
49#include "net/un/stream/SocketClient.h"
50#include "net/un/stream/tls/config/ConfigSocketClient.h"
56#ifndef DOXYGEN_SHOULD_SKIP_THIS
65namespace net::un::stream::tls {
67 template <
typename SocketContextFactoryT,
typename... Args>
69 net::un::stream::tls::
config::ConfigSocketClient,
70 SocketContextFactoryT,
73 template <
typename SocketContextFactory,
typename... SocketContextFactoryArgs>
74 SocketClient<SocketContextFactory, SocketContextFactoryArgs...>
75 Client(
const std::string& instanceName,
76 const std::function<
void(
typename SocketClient<SocketContextFactory, SocketContextFactoryArgs...>::Config&)>& configurator,
77 SocketContextFactoryArgs&&... socketContextFactoryArgs) {
78 return core::socket::
stream::Client<SocketClient<SocketContextFactory, SocketContextFactoryArgs...>>(
79 instanceName, configurator, std::forward<SocketContextFactoryArgs>(socketContextFactoryArgs)...);
82 template <
typename SocketContextFactory,
83 typename... SocketContextFactoryArgs,
84 typename = std::enable_if_t<
not std::is_invocable_v<std::tuple_element_t<0, std::tuple<SocketContextFactoryArgs...>>,
85 typename SocketClient<SocketContextFactory>::Config&>>>
86 SocketClient<SocketContextFactory, SocketContextFactoryArgs...>
Client(
const std::string& instanceName,
87 SocketContextFactoryArgs&&... socketContextFactoryArgs) {
88 return core::socket::
stream::Client<SocketClient<SocketContextFactory, SocketContextFactoryArgs...>>(
89 instanceName, std::forward<SocketContextFactoryArgs>(socketContextFactoryArgs)...);
96 net::un::stream::tls::
config::ConfigSocketClient>;
SocketClient< SocketContextFactory, SocketContextFactoryArgs... > Client(const std::string &instanceName, SocketContextFactoryArgs &&... socketContextFactoryArgs)
SocketClient< SocketContextFactory, SocketContextFactoryArgs... > Client(const std::string &instanceName, const std::function< void(typename SocketClient< SocketContextFactory, SocketContextFactoryArgs... >::Config &)> &configurator, SocketContextFactoryArgs &&... socketContextFactoryArgs)