+int ServiceFinder::handlePacket(SocketMultiplexer& sock,
+ Packet& packet,
+ const SocketAddress& address)
+{
+ try
+ {
+ uint32_t magic;
+ packet >> magic;
+ if (magic == RESPONSE)
+ {
+ std::string service;
+ std::string text;
+
+ packet >> service >> text;
+ if (service == mService)
+ {
+ mServices.push_back(Service(address, text));
+ return 0;
+ }
+ }
+ }
+ catch (...)
+ {
+ }
+
+ return -1;
+}
+
+ServiceFinder::ServiceFinder(const std::string& service, int type)