ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
server_session_pool.h File Reference

节点间多连接池,按 actor_id hash 选连接分散 IO 负载。 More...

#include "tools/type.h"
#include <unordered_map>
#include <shared_mutex>
#include <vector>

Classes

class  ngl::server_session_pool
 服务器会话池管理类。 More...

Detailed Description

节点间多连接池,按 actor_id hash 选连接分散 IO 负载。

本文件定义了服务器会话池管理类server_session_pool,提供以下功能:

  • 管理服务器间的多连接池
  • 按Actor ID哈希选择连接,实现IO负载分散
  • 支持动态添加和移除连接
  • 提供连接数统计和查询功能

该类是分布式服务器架构的核心组件,通过多连接池提高网络IO的并发处理能力。