From 297a12226c079ca8829383d332bb82c75aa60a08 Mon Sep 17 00:00:00 2001 From: Antonio Quartulli Date: Wed, 11 Apr 2018 19:03:32 +0800 Subject: [PATCH] listener: create generic ProxyListener abstract class This class can be used by pgproxy to operate on listeners no matter their actual implementation. This way pgproxy can support different listeners at the same time. Signed-off-by: Antonio Quartulli --- openvpn/ws/httpserv.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openvpn/ws/httpserv.hpp b/openvpn/ws/httpserv.hpp index 31bde1981..58c5b50ec 100644 --- a/openvpn/ws/httpserv.hpp +++ b/openvpn/ws/httpserv.hpp @@ -50,6 +50,7 @@ #endif // include acceptors for different protocols +#include #include #include #if defined(OPENVPN_PLATFORM_WIN) @@ -164,7 +165,7 @@ namespace openvpn { WebSocket::Server::PerRequest::Ptr websocket; }; - class Listener : public Acceptor::ListenerBase + class Listener : public ProxyListener { public: class Client; @@ -756,7 +757,7 @@ namespace openvpn { { } - void start() + virtual void start() override { if (halt) return; @@ -872,7 +873,7 @@ namespace openvpn { } } - void stop() + virtual void stop() override { if (halt) return;