summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/connectionbase.cpp7
-rw-r--r--common/connectionbase.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/common/connectionbase.cpp b/common/connectionbase.cpp
index c744646..23860d2 100644
--- a/common/connectionbase.cpp
+++ b/common/connectionbase.cpp
@@ -1,7 +1,6 @@
#include "connectionbase.h"
#include <iostream>
-#include <string>
void ConnectionBase::prepare_next_message() {
next_message = Message::create();
@@ -12,8 +11,6 @@ void ConnectionBase::prepare_next_message() {
void ConnectionBase::connected() {
std::cout << "Connection established." << std::endl;
- write_data((uint8_t*)"Hei!\n", 5);
-
prepare_next_message();
}
@@ -45,3 +42,7 @@ Message::p ConnectionBase::recv() {
return msg;
}
+
+ConnectionBase::~ConnectionBase() {
+ std::cout << "Connection destroyed." << std::endl;
+}
diff --git a/common/connectionbase.h b/common/connectionbase.h
index 8bd56e9..13721dc 100644
--- a/common/connectionbase.h
+++ b/common/connectionbase.h
@@ -40,6 +40,8 @@ class ConnectionBase {
//! Get received message or null if queue empty.
Message::p recv();
+
+ virtual ~ConnectionBase();
};
#endif