コード例 #1
0
ファイル: asyncService.cpp プロジェクト: coderdeng/net_code
//执行写入buffer
void talk_to_client::do_write(const std::string &msg)
{
	std::ofstream talk_to("talk_to_clients.log", std::ostream::app);
	if (!started())return;
	talk_to << msg << std::endl;
	_sock.async_write_some(buffer(msg.c_str(), msg.size()), MEN_FN2(on_write, _1, _2));
}
コード例 #2
0
 void treat (BigBoss&) { talk_to("Big Boss"); }