diff --git a/openvpn/ws/httpcliset.hpp b/openvpn/ws/httpcliset.hpp index 568f9609..b4343024 100644 --- a/openvpn/ws/httpcliset.hpp +++ b/openvpn/ws/httpcliset.hpp @@ -227,6 +227,10 @@ namespace openvpn { // completion method std::function completion; + // post-connect method, useful to validate server + // on local sockets + std::function post_connect; + // Persistent state (can be reused). // hsc.reset() can be called to explicitly // close persistent state. @@ -580,6 +584,12 @@ namespace openvpn { // this is a no-op because ts->hsc.alive() is always tested before construction } + void http_post_connect(HTTPDelegate& hd, AsioPolySock::Base& sock) + { + if (ts->post_connect) + ts->post_connect(*ts, sock); + } + ClientSet* parent; TransactionSet::Ptr ts; TransactionSet::Vector::const_iterator ts_iter;