From 766c56a693e8b1bd4293459bb256abdc0515a0b5 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 9 Jun 2009 19:01:02 +0200 Subject: Teile der Namespaces Common und Net in den neuen Namespace Core verschoben --- src/Net/Connection.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/Net/Connection.cpp') diff --git a/src/Net/Connection.cpp b/src/Net/Connection.cpp index d9ff994..81f4c64 100644 --- a/src/Net/Connection.cpp +++ b/src/Net/Connection.cpp @@ -19,7 +19,7 @@ #include "Connection.h" -#include +#include #include #include @@ -27,8 +27,6 @@ namespace Mad { namespace Net { -boost::asio::io_service Connection::ioService; - Connection::~Connection() { if(_isConnected()) @@ -37,7 +35,7 @@ Connection::~Connection() { void Connection::handleHandshake(const boost::system::error_code& error) { if(error) { - Common::Logger::logf("Error: %s", error.message().c_str()); + Core::Logger::logf("Error: %s", error.message().c_str()); // TODO Error handling doDisconnect(); @@ -63,7 +61,7 @@ void Connection::handleShutdown(const boost::system::error_code& error) { boost::lock_guard lock(connectionLock); if(error) { - Common::Logger::logf(Common::Logger::VERBOSE, "Shutdown error: %s", error.message().c_str()); + Core::Logger::logf(Core::Logger::VERBOSE, "Shutdown error: %s", error.message().c_str()); } _setState(DISCONNECTED); @@ -112,7 +110,7 @@ void Connection::handleDataReceive(const std::vector &data) { void Connection::handleRead(const boost::system::error_code& error, std::size_t bytes_transferred, std::size_t length, const boost::function1& > ¬ify) { if(error || (bytes_transferred+received) < length) { - Common::Logger::logf(Common::Logger::VERBOSE, "Read error: %s", error.message().c_str()); + Core::Logger::logf(Core::Logger::VERBOSE, "Read error: %s", error.message().c_str()); // TODO Error doDisconnect(); @@ -185,7 +183,7 @@ void Connection::handleWrite(const boost::system::error_code& error, std::size_t } if(error) { - Common::Logger::logf(Common::Logger::VERBOSE, "Write error: %s", error.message().c_str()); + Core::Logger::logf(Core::Logger::VERBOSE, "Write error: %s", error.message().c_str()); // TODO Error doDisconnect(); -- cgit v1.2.3