コード例 #1
0
	void handle_error(ranger::event::tcp_connection& conn)
	{
		auto ep = conn.remote_endpoint();
		std::cerr << "connection[" << ep << "] " << "error[" << conn.error_code() << "]: " << conn.error_description() << std::endl;

		m_conn_set.erase(conn);
	}
コード例 #2
0
	void handle_eof(ranger::event::tcp_connection& conn)
	{
		auto ep = conn.remote_endpoint();
		std::cerr << "connection[" << ep << "] " << "eof." << std::endl;

		m_conn_set.erase(conn);
	}
コード例 #3
0
	void handle_timeout(ranger::event::tcp_connection& conn)
	{
		auto ep = conn.remote_endpoint();
		std::cerr << "thread[" << std::this_thread::get_id() << "] " << "connection[" << ep << "] " << "timeout." << std::endl;

		m_conn_set.erase(conn);
	}