summaryrefslogtreecommitdiff
path: root/common/connectionbase.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/connectionbase.h')
-rw-r--r--common/connectionbase.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/connectionbase.h b/common/connectionbase.h
index 4604896..f86a9ab 100644
--- a/common/connectionbase.h
+++ b/common/connectionbase.h
@@ -3,6 +3,7 @@
#include <stdint.h>
#include <cstdlib>
+#include <string>
#include "message.h"
@@ -33,6 +34,10 @@ class ConnectionBase {
//! \param msg Received message.
virtual void got_message(const Message::p& msg) = 0;
+ //! Called upon error (lost connection or failed deserialization).
+ //! \param msg Error message.
+ virtual void error(const std::string& msg) = 0;
+
public:
ConnectionBase();
virtual ~ConnectionBase();