From 30d192259e6913a210156da2abce16e05b5a5825 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sat, 26 Aug 2006 17:40:12 +0000 Subject: Applied patch by Rogier, adding a stream operator to NetComputer for logging purposes. --- src/netcomputer.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/netcomputer.h') diff --git a/src/netcomputer.h b/src/netcomputer.h index 842d362b..5622e03c 100644 --- a/src/netcomputer.h +++ b/src/netcomputer.h @@ -26,6 +26,8 @@ #include +#include + class MessageOut; /** @@ -83,6 +85,14 @@ class NetComputer private: ENetPeer *mPeer; /**< Client peer */ + + /** + * Converts the ip-address of the peer to a stringstream. + * Example: + * std::cout << comp + */ + friend std::ostream& operator <<(std::ostream &os, + const NetComputer &comp); }; #endif // _TMWSERV_NETCOMPUTER_H_ -- cgit v1.2.3-70-g09d2