mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
ircd::net: Move listener next() to the accept event slice; various cleanup.
This commit is contained in:
parent
a1e798f12c
commit
c501f21ac2
1 changed files with 14 additions and 12 deletions
26
ircd/net.cc
26
ircd/net.cc
|
@ -286,13 +286,13 @@ noexcept try
|
||||||
std::string(*this),
|
std::string(*this),
|
||||||
string(sock->remote()));
|
string(sock->remote()));
|
||||||
|
|
||||||
/*
|
//static const asio::socket_base::keep_alive keep_alive(true);
|
||||||
static const asio::socket_base::keep_alive keep_alive(true);
|
//sock->sd.set_option(keep_alive);
|
||||||
static const asio::socket_base::linger linger(true, 30);
|
|
||||||
sock->sd.set_option(keep_alive);
|
//static const asio::socket_base::linger linger(true, 30);
|
||||||
sock->sd.set_option(linger);
|
//sock->sd.set_option(linger);
|
||||||
sock->sd.non_blocking(true);
|
|
||||||
*/
|
//sock->sd.non_blocking(false);
|
||||||
|
|
||||||
static const auto handshake_type
|
static const auto handshake_type
|
||||||
{
|
{
|
||||||
|
@ -304,7 +304,8 @@ noexcept try
|
||||||
std::bind(&acceptor::handshake, this, ph::_1, sock)
|
std::bind(&acceptor::handshake, this, ph::_1, sock)
|
||||||
};
|
};
|
||||||
|
|
||||||
sock->ssl.async_handshake(handshake_type, handshake);
|
sock->ssl.async_handshake(handshake_type, std::move(handshake));
|
||||||
|
next();
|
||||||
}
|
}
|
||||||
catch(const std::exception &e)
|
catch(const std::exception &e)
|
||||||
{
|
{
|
||||||
|
@ -382,15 +383,16 @@ ircd::net::listener::acceptor::configure(const json::object &opts)
|
||||||
|
|
||||||
ssl.set_options
|
ssl.set_options
|
||||||
(
|
(
|
||||||
ssl.default_workarounds
|
//ssl.default_workarounds
|
||||||
//| ssl.no_tlsv1
|
//| ssl.no_tlsv1
|
||||||
//| ssl.no_tlsv1_1
|
//| ssl.no_tlsv1_1
|
||||||
| ssl.no_tlsv1_2
|
//| ssl.no_tlsv1_2
|
||||||
//| ssl.no_sslv2
|
//| ssl.no_sslv2
|
||||||
| ssl.no_sslv3
|
//| ssl.no_sslv3
|
||||||
//| ssl.single_dh_use
|
ssl.single_dh_use
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
//TODO: XXX
|
//TODO: XXX
|
||||||
ssl.set_password_callback([this]
|
ssl.set_password_callback([this]
|
||||||
(const auto &size, const auto &purpose)
|
(const auto &size, const auto &purpose)
|
||||||
|
|
Loading…
Reference in a new issue