blob: 99873a064a39de67206f724c55dd6ae6952f305d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifndef SWIFTEN_CONNECTIONLAYER_H
#define SWIFTEN_CONNECTIONLAYER_H
#include <boost/signal.hpp>
#include "Swiften/StreamStack/LowLayer.h"
#include "Swiften/Network/Connection.h"
namespace Swift {
class ConnectionLayer : public LowLayer {
public:
ConnectionLayer(Connection* connection) : connection_(connection) {
connection_->onDataRead.connect(onDataRead);
}
void writeData(const ByteArray& data) {
connection_->write(data);
}
private:
Connection* connection_;
};
}
#endif
|