|
| static i32_serverid | serverid (i64_actorid aactorid) |
| | 将actor guid解析为所属服务器ID。
|
| static i32_serverid | gatewayid (i64_actorid aactorid) |
| | 将角色actor解析为当前拥有它的网关服务器。
|
| static void | serveridlist (ENUM_ACTOR atype, std::set< i32_serverid > &avec) |
| | 收集给定单例/系统actor类型的所有服务器ID。
|
| template<typename T> |
| static bool | send (i32_sessionid asession, T &adata, const nguid &aactorid, const nguid &arequestactorid) |
| | 通过已有的TCP会话发送一个类型化负载。
|
| static bool | send_pack (i32_serverid aserverid, std::shared_ptr< pack > &apack) |
| | 将一个已构建的包发送到拥有该路由的服务器。
|
| static bool | send_pack (i32_serverid aserverid, std::shared_ptr< void > &apack) |
| | 将一个已构建的包(类型擦除)发送到拥有该路由的服务器。
|
|
template<typename T, bool IS_SEND = true> |
| static void | make_forward (handle_pram &apram) |
|
template<typename T> |
| static void | make_client (handle_pram &apram) |
|
template<typename T, bool IS_SEND = true, bool IS_FORWARDFUN = true> |
| static handle_pram | create (const nguid &aid, const nguid &arid, const std::shared_ptr< T > &adata, const callfail &afailfun=nullptr) |
|
template<typename T, bool IS_SEND = true> |
| static handle_pram | create (const std::set< i64_actorid > &aids, const nguid &arid, const std::shared_ptr< T > &adata, const callfail &afailfun=nullptr) |
|
template<typename T, typename Y> |
| static handle_pram | create (const nguid &aid, const nguid &arid, const nforward_g2c< T, Y > &adata, const callfail &afailfun=nullptr) |
|
template<typename T, typename Y> |
| static handle_pram | create (const nguid &aid, const nguid &arid, const nforward_c2g< T, Y > &adata, const callfail &afailfun=nullptr) |
|
static handle_pram | create (const nguid &aid, const nguid &arid, const std::shared_ptr< pack > &apack) |
|
template<typename Y> |
| static bool | send (const nguid &aactorid, handle_pram &adata) |
消息调度参数块,携带发送者、接收者和负载信息。
该结构体是Actor消息传递系统的核心数据结构,封装了:
- 协议类型和负载数据
- 发送者和接收者的Actor GUID
- 批量转发目标集合
- 转发回调和失败处理
支持单播、批量广播和按类型广播三种消息发送模式。