Function registerNewConnectionAdvice

Synopsis

#include <lib/inc/drogon/HttpAppFramework.h>

virtual HttpAppFramework & registerNewConnectionAdvice(const std::function< bool(const trantor::InetAddress &, const trantor::InetAddress &)> &advice)=0

Description

Register an advice for new connections.

Parameters:

advice - is called immediately when a new connection is established. the first parameter of it is the remote address of the new connection, the second one is the local address of it. If the advice returns a false value, drogon closes the connection. Users can use this advice to implement some security policies.

Mentioned in

Source

Line 192 in lib/inc/drogon/HttpAppFramework.h.






Add Discussion as Guest

Log in to DocsForge