0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-11 14:38:57 +02:00

ircd::net: Addition assertions; use constrefs in handler cbs.

This commit is contained in:
Jason Volk 2019-04-16 21:27:01 -07:00
parent 945ce126c5
commit 0f404a0bda
2 changed files with 4 additions and 2 deletions

View file

@ -64,7 +64,7 @@ struct ircd::net::socket
bool handle_verify(bool, asio::ssl::verify_context &, const open_opts &) noexcept;
void handle_disconnect(std::shared_ptr<socket>, eptr_handler, error_code) noexcept;
void handle_handshake(std::weak_ptr<socket>, eptr_handler, error_code) noexcept;
void handle_connect(std::weak_ptr<socket>, open_opts, eptr_handler, error_code) noexcept;
void handle_connect(std::weak_ptr<socket>, const open_opts &, eptr_handler, error_code) noexcept;
void handle_timeout(std::weak_ptr<socket>, ec_handler, error_code) noexcept;
void handle_ready(std::weak_ptr<socket>, ready, ec_handler, error_code, size_t) noexcept;

View file

@ -2556,6 +2556,8 @@ void
ircd::net::socket::handshake(const open_opts &opts,
eptr_handler callback)
{
assert(!fini && sd.is_open());
log::debug
{
log, "%s handshaking to '%s' for '%s' to:%ld$ms",
@ -3086,7 +3088,7 @@ catch(const std::exception &e)
void
ircd::net::socket::handle_connect(std::weak_ptr<socket> wp,
const open_opts opts,
const open_opts &opts,
eptr_handler callback,
error_code ec)
noexcept try