예제 #1
0
static void on_contact_message(const std::string& name, fscp::server& server, const fscp::server::ep_type& sender, fscp::hash_type hash, const fscp::server::ep_type& target)
{
	mutex::scoped_lock lock(output_mutex);

	std::cout << "[" << name << "] Received CONTACT from " << sender << ": " << hash << " is at " << target << std::endl;

	server.async_greet(target, boost::bind(&on_hello_response, name, boost::ref(server), target, _1, _2));
}
예제 #2
0
파일: client.cpp 프로젝트: reaper/libfscp
static void on_contact_message(const std::string& name, fscp::server& server, const fscp::server::ep_type& sender, fscp::server::cert_type cert, const fscp::server::ep_type& target)
{
	std::cout << "[" << name << "] Received CONTACT from " << sender << ": " << cert.subject().oneline() << " is at " << target << std::endl;

	server.async_greet(target, boost::bind(&on_hello_response, name, boost::ref(server), _1, _2, _3));
}