summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/StreamStack/IncomingConnectionLayer.h')
-rw-r--r--Swiften/StreamStack/IncomingConnectionLayer.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/Swiften/StreamStack/IncomingConnectionLayer.h b/Swiften/StreamStack/IncomingConnectionLayer.h
new file mode 100644
index 0000000..c1a9eab
--- /dev/null
+++ b/Swiften/StreamStack/IncomingConnectionLayer.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include <boost/signal.hpp>
+
+#include "Swiften/StreamStack/LowLayer.h"
+#include "Swiften/Network/IncomingConnection.h"
+
+namespace Swift {
+ class IncomingConnectionLayer : public LowLayer {
+ public:
+ IncomingConnectionLayer(IncomingConnection* connection) : connection_(connection) {
+ connection_->onDataRead.connect(onDataRead);
+ }
+
+ void writeData(const ByteArray& data) {
+ connection_->write(data);
+ }
+
+ private:
+ IncomingConnection* connection_;
+ };
+}