summaryrefslogtreecommitdiff
path: root/src/net/connectionhandler.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-03-31 09:45:43 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-03-31 09:45:43 +0000
commitbd9b9a04c0ec07c957014d0679d386c7b42e5312 (patch)
treef18a9c3de8a88f99472d0e87dd19e89512dca880 /src/net/connectionhandler.cpp
parenta85d2b47912ea32e3ecf77632242fa6f759a0ade (diff)
downloadmanaserv-bd9b9a04c0ec07c957014d0679d386c7b42e5312.tar.gz
manaserv-bd9b9a04c0ec07c957014d0679d386c7b42e5312.tar.bz2
manaserv-bd9b9a04c0ec07c957014d0679d386c7b42e5312.tar.xz
manaserv-bd9b9a04c0ec07c957014d0679d386c7b42e5312.zip
Moved writing of incoming messages into MessageIn and tweaked the printing of
the message ID.
Diffstat (limited to 'src/net/connectionhandler.cpp')
-rw-r--r--src/net/connectionhandler.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net/connectionhandler.cpp b/src/net/connectionhandler.cpp
index 04bf0169..6de1835e 100644
--- a/src/net/connectionhandler.cpp
+++ b/src/net/connectionhandler.cpp
@@ -38,10 +38,11 @@ bool ConnectionHandler::startListen(enet_uint16 port)
address.port = port;
LOG_INFO("Listening on port " << port << "...");
- host = enet_host_create(&address /* the address to bind the server host to */,
- MAX_CLIENTS /* allow up to MAX_CLIENTS clients and/or outgoing connections */,
- 0 /* assume any amount of incoming bandwidth */,
- 0 /* assume any amount of outgoing bandwidth */);
+ host = enet_host_create(
+ &address /* the address to bind the server host to */,
+ MAX_CLIENTS /* allow up to MAX_CLIENTS connections */,
+ 0 /* assume any amount of incoming bandwidth */,
+ 0 /* assume any amount of outgoing bandwidth */);
return host;
}
@@ -111,8 +112,7 @@ void ConnectionHandler::process(enet_uint32 timeout)
if (event.packet->dataLength >= 2) {
MessageIn msg((char *)event.packet->data,
event.packet->dataLength);
- LOG_DEBUG("Received message " << msg.getId() << " ("
- << event.packet->dataLength << " B) from "
+ LOG_DEBUG("Received message " << msg << " from "
<< *comp);
processMessage(comp, msg);