summaryrefslogtreecommitdiffstats
path: root/src/Net/Connection.cpp
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-06-09 19:01:02 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-06-09 19:01:02 +0200
commit766c56a693e8b1bd4293459bb256abdc0515a0b5 (patch)
treeda8e51003cf801344e22b0b2b2e28a48d6a8b74c /src/Net/Connection.cpp
parent452320b5ec31447a526735016fa07589cb848032 (diff)
downloadmad-766c56a693e8b1bd4293459bb256abdc0515a0b5.tar
mad-766c56a693e8b1bd4293459bb256abdc0515a0b5.zip
Teile der Namespaces Common und Net in den neuen Namespace Core verschoben
Diffstat (limited to 'src/Net/Connection.cpp')
-rw-r--r--src/Net/Connection.cpp12
1 files changed, 5 insertions, 7 deletions
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 <Common/Logger.h>
+#include <Core/Logger.h>
#include <cstring>
#include <boost/bind.hpp>
@@ -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<boost::shared_mutex> 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<boost::uint8_t> &data) {
void Connection::handleRead(const boost::system::error_code& error, std::size_t bytes_transferred, std::size_t length, const boost::function1<void, const std::vector<boost::uint8_t>& > &notify) {
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();