]>
Dogcows Code - chaz/yoink/blob - src/Moof/Service.cc
400006ba2eb6ee59a4e4dad2391b90dd3a55240a
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 **************************************************************************/
16 #define SOLICIT 0x1234ABCD
17 #define RESPONSE 0xABCD1234
23 int Service::handlePacket(SocketMultiplexer
& sock
,
25 const SocketAddress
& address
)
41 out
<< RESPONSE
<< mAddress
.service() << mText
;
42 sock
.socket().write(out
);
48 int ServiceFinder::handlePacket(SocketMultiplexer
& sock
,
50 const SocketAddress
& address
)
56 if (magic
== RESPONSE
)
61 packet
>> service
>> text
;
62 if (service
== mService
)
64 mServices
.push_back(Service(address
, text
));
76 ServiceFinder::ServiceFinder(const std::string
& service
, int type
)
This page took 0.04064 seconds and 4 git commands to generate.