Skip to content

Commit

Permalink
listener: create generic ProxyListener abstract class
Browse files Browse the repository at this point in the history
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 <antonio@openvpn.net>
  • Loading branch information
ordex authored and lstipakov committed Jan 31, 2020
1 parent b6ececa commit 297a122
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions openvpn/ws/httpserv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#endif

// include acceptors for different protocols
#include <openvpn/proxy/listener.hpp>
#include <openvpn/acceptor/base.hpp>
#include <openvpn/acceptor/tcp.hpp>
#if defined(OPENVPN_PLATFORM_WIN)
Expand Down Expand Up @@ -164,7 +165,7 @@ namespace openvpn {
WebSocket::Server::PerRequest::Ptr websocket;
};

class Listener : public Acceptor::ListenerBase
class Listener : public ProxyListener
{
public:
class Client;
Expand Down Expand Up @@ -756,7 +757,7 @@ namespace openvpn {
{
}

void start()
virtual void start() override
{
if (halt)
return;
Expand Down Expand Up @@ -872,7 +873,7 @@ namespace openvpn {
}
}

void stop()
virtual void stop() override
{
if (halt)
return;
Expand Down

0 comments on commit 297a122

Please sign in to comment.