diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-01-24 19:29:06 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-01-24 19:29:06 (GMT) |
commit | c27c75917aea053baaa884638a3c056666a05602 (patch) | |
tree | 8d34678a091964275eaac2c078ea3cb470dc2a21 /Swiften/Network | |
parent | 0a0a3046ad01ee4f3aa436485ae48cbff9d74272 (diff) | |
download | swift-c27c75917aea053baaa884638a3c056666a05602.zip swift-c27c75917aea053baaa884638a3c056666a05602.tar.bz2 |
Added debug output to boost connection.
Diffstat (limited to 'Swiften/Network')
-rw-r--r-- | Swiften/Network/BoostConnection.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Swiften/Network/BoostConnection.cpp b/Swiften/Network/BoostConnection.cpp index 49a0429..bba2c07 100644 --- a/Swiften/Network/BoostConnection.cpp +++ b/Swiften/Network/BoostConnection.cpp @@ -10,6 +10,7 @@ #include <boost/bind.hpp> #include <boost/thread.hpp> +#include <Swiften/Base/Log.h> #include "Swiften/EventLoop/EventLoop.h" #include "Swiften/Base/String.h" #include "Swiften/Base/ByteArray.h" @@ -91,6 +92,7 @@ void BoostConnection::doWrite(const ByteArray& data) { } void BoostConnection::handleConnectFinished(const boost::system::error_code& error) { + SWIFT_LOG(debug) << "Connect finished: " << error << std::endl; if (!error) { eventLoop->postEvent(boost::bind(boost::ref(onConnectFinished), false), shared_from_this()); doRead(); @@ -107,6 +109,7 @@ void BoostConnection::doRead() { } void BoostConnection::handleSocketRead(const boost::system::error_code& error, size_t bytesTransferred) { + SWIFT_LOG(debug) << "Socket read " << error << std::endl; if (!error) { eventLoop->postEvent(boost::bind(boost::ref(onDataRead), ByteArray(&readBuffer_[0], bytesTransferred)), shared_from_this()); doRead(); @@ -120,6 +123,7 @@ void BoostConnection::handleSocketRead(const boost::system::error_code& error, s } void BoostConnection::handleDataWritten(const boost::system::error_code& error) { + SWIFT_LOG(debug) << "Data written " << error << std::endl; if (!error) { eventLoop->postEvent(boost::ref(onDataWritten), shared_from_this()); } |