]>
Dogcows Code - chaz/yoink/blob - src/moof/service.cc
2 /*] Copyright (c) 2009-2011, Charles McGarvey [*****************************
3 **] All rights reserved.
5 * Distributable under the terms and conditions of the 2-clause BSD license;
6 * see the file COPYING for a complete text of the license.
8 *****************************************************************************/
13 #define SOLICIT 0x1234ABCD
14 #define RESPONSE 0xABCD1234
20 int service::handle_packet(socket_multiplexer
& mux
,
21 packet
& packet
, const socket::address
& address
)
34 packet
<< RESPONSE
<< type_
<< name_
<< text_
;
35 mux
.socket().write(packet
);
46 int service_finder::handle_packet(socket_multiplexer
& mux
,
47 packet
& packet
, const socket::address
& address
)
53 if (magic
== RESPONSE
)
61 packet
>> name
>> text
;
62 service
service(address
, type
, name
, text
);
63 services_
.insert(std::make_pair(name
, service
));
74 service_finder::service_finder(const std::string
& type
, int sockType
)
This page took 0.037292 seconds and 5 git commands to generate.