]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Service.cc
the massive refactoring effort
[chaz/yoink] / src / Moof / Service.cc
diff --git a/src/Moof/Service.cc b/src/Moof/Service.cc
deleted file mode 100644 (file)
index da135c1..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-
-/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
-**]  All rights reserved.
-*
-* vi:ts=4 sw=4 tw=75
-*
-* Distributable under the terms and conditions of the 2-clause BSD license;
-* see the file COPYING for a complete text of the license.
-*
-**************************************************************************/
-
-#include "Service.hh"
-#include "Socket.hh"
-
-
-#define SOLICIT  0x1234ABCD
-#define RESPONSE 0xABCD1234
-
-
-namespace Mf {
-
-
-int Service::handlePacket(SocketMultiplexer& mux,
-                                                 Packet& packet,
-                                                 const SocketAddress& address)
-{
-       try
-       {
-               uint32_t magic;
-               packet >> magic;
-               if (magic == SOLICIT)
-               {
-                       std::string type;
-                       packet >> type;
-                       if (type == mType)
-                       {
-                               packet.clear();
-                               packet << RESPONSE << mType << mName << mText;
-                               mux.socket().write(packet);
-                               return 0;
-                       }
-               }
-       }
-       catch (...) {}
-       return -1;
-}
-
-int ServiceFinder::handlePacket(SocketMultiplexer& mux,
-                                                               Packet& packet,
-                                                               const SocketAddress& address)
-{
-       try
-       {
-               uint32_t magic;
-               packet >> magic;
-               if (magic == RESPONSE)
-               {
-                       std::string type;
-                       packet >> type;
-                       if (type == mType)
-                       {
-                               std::string name;
-                               std::string     text;
-                               packet >> name >> text;
-                               Service service(address, type, name, text);
-                               mServices.insert(std::make_pair(name, service));
-                               return 0;
-                       }
-               }
-       }
-       catch (...) {}
-       return -1;
-}
-
-ServiceFinder::ServiceFinder(const std::string& type, int sockType)
-{
-}
-
-
-} // namespace Mf
-
This page took 0.023143 seconds and 4 git commands to generate.