]>
Dogcows Code - chaz/yoink/blob - src/moof/service.cc
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::handle_packet(socket_multiplexer
& mux
,
25 const socket::address
& address
)
38 packet
<< RESPONSE
<< type_
<< name_
<< text_
;
39 mux
.socket().write(packet
);
48 int service_finder::handle_packet(socket_multiplexer
& mux
,
50 const socket::address
& address
)
56 if (magic
== RESPONSE
)
64 packet
>> name
>> text
;
65 service
service(address
, type
, name
, text
);
66 services_
.insert(std::make_pair(name
, service
));
75 service_finder::service_finder(const std::string
& type
, int sockType
)
This page took 0.035748 seconds and 4 git commands to generate.