From c27c75917aea053baaa884638a3c056666a05602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Mon, 24 Jan 2011 20:29:06 +0100 Subject: Added debug output to boost connection. 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 #include +#include #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()); } -- cgit v0.10.2-6-g49f6