X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fmoof%2Fservice.hh;h=1a8b363ff7fc806fd2f2e7bd56dc4f0e64000d4d;hp=6db1d964b1e47a76c0cfc2c77af0fb9962a8f374;hb=44b3014bce798789e795242d1556cb7449e6386a;hpb=831f04d4bc19a390415ac0bbac4331c7a65509bc diff --git a/src/moof/service.hh b/src/moof/service.hh index 6db1d96..1a8b363 100644 --- a/src/moof/service.hh +++ b/src/moof/service.hh @@ -1,28 +1,26 @@ -/*] Copyright (c) 2009-2010, Charles McGarvey [************************** +/*] Copyright (c) 2009-2011, 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. * -**************************************************************************/ +*****************************************************************************/ #ifndef _MOOF_SERVICE_HH_ #define _MOOF_SERVICE_HH_ -/** - * \file service.hh - * Classes for publishing and finding network services. - */ - #include #include #include +/** + * \file service.hh + * Classes for publishing and finding network services. + */ + namespace moof { @@ -56,7 +54,6 @@ public: const std::string& name, const std::string& text); - /** * Publish the service on the network. */ @@ -67,7 +64,6 @@ public: */ void stop(); - /** * Get the host address. * \return The address. @@ -104,20 +100,17 @@ public: return text_; } - ~service(); - private: int handle_packet(socket_multiplexer& mux, - packet& packet, - const socket::address& address); + packet& packet, const socket::address& address); socket::address address_; - std::string type_; - std::string name_; - std::string text_; + std::string type_; + std::string name_; + std::string text_; }; @@ -138,22 +131,19 @@ public: * \param sockType The type of socket. */ explicit service_finder(const std::string& type, - int sockType = SOCK_STREAM); - + int sockType = SOCK_STREAM); const std::map& services() const { return services_; } - private: int handle_packet(socket_multiplexer& mux, - packet& packet, - const socket::address& address); + packet& packet, const socket::address& address); - std::string type_; + std::string type_; std::map services_; };