Adds virtual destructors to handler interfaces fixes #136

This commit is contained in:
Peter Thorson
2012-09-24 07:47:14 -05:00
parent a17a27dd5c
commit dd9899c34b
4 changed files with 8 additions and 0 deletions

View File

@@ -187,6 +187,8 @@ public:
// handler interface callback class
class handler_interface {
public:
virtual ~handler_interface() {}
// Required
virtual void on_open(connection_ptr con) {}
virtual void on_close(connection_ptr con) {}

View File

@@ -174,6 +174,8 @@ public:
// handler interface callback base class
class handler_interface {
public:
virtual ~handler_interface() {}
virtual void on_handshake_init(connection_ptr con) {}
virtual void validate(connection_ptr con) {}

View File

@@ -52,6 +52,8 @@ public:
// hooks that this policy adds to handlers of connections that use it
class handler_interface {
public:
virtual ~handler_interface() {}
virtual void on_tcp_init() {};
};

View File

@@ -69,6 +69,8 @@ public:
// to set up their asio TLS context.
class handler_interface {
public:
virtual ~handler_interface() {}
virtual void on_tcp_init() {};
virtual boost::shared_ptr<boost::asio::ssl::context> on_tls_init() = 0;
};