summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/ipc/raw_tcp_connection.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/ipc/raw_tcp_connection.h')
-rw-r--r--src/osd/modules/ipc/raw_tcp_connection.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/osd/modules/ipc/raw_tcp_connection.h b/src/osd/modules/ipc/raw_tcp_connection.h
new file mode 100644
index 00000000000..7bcfe80bfc6
--- /dev/null
+++ b/src/osd/modules/ipc/raw_tcp_connection.h
@@ -0,0 +1,30 @@
+// license:BSD-3-Clause
+// copyright-holders:Inaki Baz Castillo,Miodrag Milanovic
+
+#ifndef RAW_TCP_CONNECTION_H
+#define RAW_TCP_CONNECTION_H
+
+#include "tcp_connection.h"
+
+
+class raw_tcp_connection : public tcp_connection
+{
+public:
+ class listener
+ {
+ public:
+ virtual ~listener(){ }
+ virtual void on_data_recv(raw_tcp_connection *connection, const uint8_t* data, size_t len) = 0;
+ };
+
+ raw_tcp_connection(listener* listener, size_t bufferSize);
+ virtual ~raw_tcp_connection();
+
+ /* Pure virtual methods inherited from tcp_connection. */
+ virtual void user_on_tcp_connection_read() override;
+
+private:
+ // Passed by argument.
+ listener* m_listener;
+};
+#endif