void handle_read(ranger::event::tcp_connection& conn, ranger::event::buffer&& buf)
	{
		std::vector<char> v(buf.size());
		buf.remove(&v.front(), v.size());
		for (auto ch: v) std::cout << ch << std::flush;
		conn.write_buffer().append(&v.front(), v.size());
	}
	void handle_read(ranger::event::tcp_connection& conn, ranger::event::buffer&& buf)
	{
		std::cout << "thread[" << std::this_thread::get_id() << "] " << __FUNCTION__ << std::endl;
		conn.write_buffer().append(buf);
	}
示例#3
0
	void handle_read(ranger::event::tcp_connection& conn, ranger::event::buffer&& buf) {
		conn.write_buffer().append(buf);
	}