协议元数据信息结构体。
More...
#include <tprotocol.h>
|
|
using | func = std::function<bool(int64_t, void*)> |
| | Actor处理函数类型
|
|
using | funclientc = std::function<bool(int64_t, const char*, void*)> |
| | 客户端处理函数类型
|
|
|
i32_protocolnum | m_protocol = 0 |
| | 协议ID
|
|
int32_t | m_highvalue = 0 |
| | 优先级值,较低的值可以更早通过就绪门控
|
|
std::string | m_name |
| | 调试/显示名称
|
|
std::array< funclientc, enscript_count > | m_toclient |
| | 脚本桥接回调,用于将协议发送给客户端
|
|
std::array< func, enscript_count > | m_toactor |
| | 脚本桥接回调,用于将协议发送给actor
|
◆ toactor()
template<enscript SCRIPT>
| const func * ngl::tprotocol::info::toactor |
( |
| ) |
|
|
inline |
获取指定脚本类型的Actor处理函数。
- Template Parameters
-
- Returns
- 处理函数指针,无效类型返回nullptr。
◆ toclient()
template<enscript SCRIPT>
| const funclientc * ngl::tprotocol::info::toclient |
( |
| ) |
|
|
inline |
获取指定脚本类型的客户端处理函数。
- Template Parameters
-
- Returns
- 处理函数指针,无效类型返回nullptr。
The documentation for this struct was generated from the following file:
- E:/GitHub/ngl_server/public/cpp/actor/protocol/tprotocol.h