summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-05-18 16:22:06 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-05-18 16:50:18 (GMT)
commit8472194d716e0e3b95a66bf5be45c246ee79d0af (patch)
treeb9f473e0e606b012ee5013e85d2cf5e7523b7029 /Swiften/Network/BoostConnection.h
parentb1b3b8f88517ad8b14795cc8a6265962d2935be3 (diff)
downloadswift-contrib-8472194d716e0e3b95a66bf5be45c246ee79d0af.zip
swift-contrib-8472194d716e0e3b95a66bf5be45c246ee79d0af.tar.bz2
Propagate use of SafeByteArray down to the connection.
Diffstat (limited to 'Swiften/Network/BoostConnection.h')
-rw-r--r--Swiften/Network/BoostConnection.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/Swiften/Network/BoostConnection.h b/Swiften/Network/BoostConnection.h
index 0e7624d..259fcec 100644
--- a/Swiften/Network/BoostConnection.h
+++ b/Swiften/Network/BoostConnection.h
@@ -13,6 +13,7 @@
#include <Swiften/Network/Connection.h>
#include <Swiften/EventLoop/EventOwner.h>
+#include <Swiften/Base/SafeByteArray.h>
namespace boost {
class thread;
@@ -37,7 +38,7 @@ namespace Swift {
virtual void listen();
virtual void connect(const HostAddressPort& address);
virtual void disconnect();
- virtual void write(const ByteArray& data);
+ virtual void write(const SafeByteArray& data);
boost::asio::ip::tcp::socket& getSocket() {
return socket_;
@@ -52,15 +53,15 @@ namespace Swift {
void handleSocketRead(const boost::system::error_code& error, size_t bytesTransferred);
void handleDataWritten(const boost::system::error_code& error);
void doRead();
- void doWrite(const ByteArray& data);
+ void doWrite(const SafeByteArray& data);
private:
EventLoop* eventLoop;
boost::shared_ptr<boost::asio::io_service> ioService;
boost::asio::ip::tcp::socket socket_;
- std::vector<char> readBuffer_;
+ SafeByteArray readBuffer_;
boost::mutex writeMutex_;
bool writing_;
- ByteArray writeQueue_;
+ SafeByteArray writeQueue_;
};
}