]>
Dogcows Code - chaz/yoink/blob - src/Moof/Service.hh
2 /*] Copyright (c) 2009-2010, Charles McGarvey [**************************
3 **] All rights reserved.
7 * Distributable under the terms and conditions of the 2-clause BSD license;
8 * see the file COPYING for a complete text of the license.
10 **************************************************************************/
14 * Classes for publishing and finding network services.
17 #ifndef _MOOF_SERVICE_HH_
18 #define _MOOF_SERVICE_HH_
22 #include <Moof/Math.hh>
23 #include <Moof/Socket.hh>
30 * Class representing a network service.
37 * Construct a network service.
38 * \param address The address of the host.
39 * \param text The service information.
41 Service(const SocketAddress
& address
, const std::string
& text
);
45 * Publish the service on the local network.
53 * Get the host address.
54 * \return The address.
56 const SocketAddress
& address() const
62 * Get the service information.
63 * \return The service information as a string.
65 const std::string
& text() const
73 int handlePacket(SocketMultiplexer
& sock
,
75 const SocketAddress
& address
);
77 SocketAddress mAddress
;
86 ServiceFinder(const std::string
& service
, int type
= SOCK_STREAM
);
89 const std::vector
<Service
>& services() const
97 int handlePacket(SocketMultiplexer
& sock
,
99 const SocketAddress
& address
);
101 std::string mService
;
102 std::vector
<Service
> mServices
;
108 #endif // _MOOF_SERVICE_HH_
This page took 0.041259 seconds and 4 git commands to generate.