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_L2_STREAM_SOCKETSERVER_H
43#define NET_L2_STREAM_SOCKETSERVER_H
45#include "core/socket/stream/SocketServer.h"
46#include "net/l2/phy/stream/PhysicalSocketServer.h"
48#ifndef DOXYGEN_SHOULD_SKIP_THIS
56namespace net::l2::stream {
58 template <
template <
typename PhysicalSocketServer,
typename ConfigSocketServer>
typename SocketAcceptorT,
59 typename ConfigSocketServerT,
60 typename SocketContextFactoryT,
64 SocketContextFactoryT,
75 const Super&
listen(uint16_t psm,
const std::function<
void(
const SocketAddress&, core::socket::
State)>& onStatus)
const {
76 Super::getConfig().Local::setPsm(psm);
78 return listen(onStatus);
82 listen(uint16_t psm,
int backlog,
const std::function<
void(
const SocketAddress&, core::socket::
State)>& onStatus)
const {
83 Super::getConfig().Local::setPsm(psm);
84 Super::getConfig().setBacklog(backlog);
86 return listen(onStatus);
91 const std::function<
void(
const SocketAddress&, core::socket::
State)>& onStatus)
const {
92 Super::getConfig().Local::setBtAddress(btAddress).setPsm(psm);
94 return listen(onStatus);
100 const std::function<
void(
const SocketAddress& SocketAddress, core::socket::
State)>& onStatus)
const {
101 Super::getConfig().Local::setBtAddress(btAddress).setPsm(psm);
102 Super::getConfig().setBacklog(backlog);
104 return listen(onStatus);
const Super & listen(uint16_t psm, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
core::socket::stream:: SocketServer< SocketAcceptorT< net::l2::phy::stream::PhysicalSocketServer, ConfigSocketServerT >, SocketContextFactoryT, Args... > Super
const Super & listen(const std::string &btAddress, uint16_t psm, int backlog, const std::function< void(const SocketAddress &SocketAddress, core::socket::State)> &onStatus) const
const Super & listen(uint16_t psm, int backlog, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
const Super & listen(const std::string &btAddress, uint16_t psm, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
SocketServer< SocketContextFactory, SocketContextFactoryArgs... > Server(const std::string &instanceName, SocketContextFactoryArgs &&... socketContextFactoryArgs)
net::l2::stream::SocketServer< core::socket::stream::legacy::SocketAcceptor, net::l2::stream::legacy::config::ConfigSocketServer, SocketContextFactoryT, Args... > SocketServer
SocketServer< SocketContextFactory, SocketContextFactoryArgs... > Server(const std::string &instanceName, const std::function< void(typename SocketServer< SocketContextFactory, SocketContextFactoryArgs... >::Config &)> &configurator, SocketContextFactoryArgs &&... socketContextFactoryArgs)