]>
Dogcows Code - chaz/yoink/blob - src/Moof/Service.cc
3432ae6ac12c763857fe25d558442a18f192f66f
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
<< mType
<< mName
<< mText
;
42 sock
.socket().write(out
);
48 int ServiceFinder::handlePacket(SocketMultiplexer
& sock
,
50 const SocketAddress
& address
)
56 if (magic
== RESPONSE
)
64 packet
>> name
>> text
;
65 mServices
.insert(std::make_pair(name
,
66 Service(address
, name
, text
)));
78 ServiceFinder::ServiceFinder(const std::string
& type
, int sockType
)
This page took 0.036468 seconds and 4 git commands to generate.