summaryrefslogtreecommitdiffstats
blob: c1a9eab9adf1ee50183e160bc57f0248920dd84d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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_;
	};
}