diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-10-08 23:08:21 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-10-08 23:08:21 +0200 |
commit | 58c5d4eefdf1cdee0651f7c74ffd1501adbdc9c3 (patch) | |
tree | 340e4f8ccfd172e197db6aa20cd6cfc7bec0f40e /src/Net/Packets/HostListPacket.cpp | |
parent | 3bb4da8601bd4d6de56d57507faf7fa115a15037 (diff) | |
download | mad-58c5d4eefdf1cdee0651f7c74ffd1501adbdc9c3.tar mad-58c5d4eefdf1cdee0651f7c74ffd1501adbdc9c3.zip |
fsinfo-Befehl implementiert
Diffstat (limited to 'src/Net/Packets/HostListPacket.cpp')
-rw-r--r-- | src/Net/Packets/HostListPacket.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/Net/Packets/HostListPacket.cpp b/src/Net/Packets/HostListPacket.cpp index 8c3d395..659b621 100644 --- a/src/Net/Packets/HostListPacket.cpp +++ b/src/Net/Packets/HostListPacket.cpp @@ -26,14 +26,10 @@ namespace Net { namespace Packets { void HostListPacket::assemblePacket() { - std::ostringstream stream; + std::string str; - for(std::vector<Common::HostInfo>::iterator host = hostList.begin(); host != hostList.end(); ++host) { - stream << host->getName() << std::endl; - stream << host->getIP() << std::endl; - } - - std::string str = stream.str(); + for(std::vector<Common::HostInfo>::iterator host = hostList.begin(); host != hostList.end(); ++host) + str += host->getName() + "\n" + host->getIP() + "\n"; setLength(sizeof(uint16_t) + sizeof(HostData)*hostList.size() + str.length()); |