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_LEGACY_SOCKETSERVER_H
43#define NET_UN_STREAM_LEGACY_SOCKETSERVER_H
47#include "core/socket/stream/legacy/SocketAcceptor.h"
48#include "core/socket/stream/legacy/SocketConnection.h"
49#include "net/un/stream/SocketServer.h"
50#include "net/un/stream/legacy/config/ConfigSocketServer.h"
56#ifndef DOXYGEN_SHOULD_SKIP_THIS
65namespace net::un::stream::legacy {
67 template <
typename SocketContextFactoryT,
typename... Args>
69 net::un::stream::legacy::
config::ConfigSocketServer,
70 SocketContextFactoryT,
73 template <
typename SocketContextFactory,
typename... SocketContextFactoryArgs>
74 SocketServer<SocketContextFactory, SocketContextFactoryArgs...>
75 Server(
const std::string& instanceName,
76 const std::function<
void(
typename SocketServer<SocketContextFactory, SocketContextFactoryArgs...>::Config&)>& configurator,
77 SocketContextFactoryArgs&&... socketContextFactoryArgs) {
78 return core::socket::
stream::Server<SocketServer<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 SocketServer<SocketContextFactory>::Config&>>>
86 SocketServer<SocketContextFactory, SocketContextFactoryArgs...>
Server(
const std::string& instanceName,
87 SocketContextFactoryArgs&&... socketContextFactoryArgs) {
88 return core::socket::
stream::Server<SocketServer<SocketContextFactory, SocketContextFactoryArgs...>>(
89 instanceName, std::forward<SocketContextFactoryArgs>(socketContextFactoryArgs)...);
96 net::un::stream::legacy::
config::ConfigSocketServer>;
SocketServer< SocketContextFactory, SocketContextFactoryArgs... > Server(const std::string &instanceName, SocketContextFactoryArgs &&... socketContextFactoryArgs)
SocketServer< SocketContextFactory, SocketContextFactoryArgs... > Server(const std::string &instanceName, const std::function< void(typename SocketServer< SocketContextFactory, SocketContextFactoryArgs... >::Config &)> &configurator, SocketContextFactoryArgs &&... socketContextFactoryArgs)