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

基于Boost.Asio的UDP套接字KCP收发封装。 More...

#include "tools/tools/tools_time_wheel.h"
#include "tools/tools/tools_thread.h"
#include "net/udp/kcp/kcp_endpoint.h"
#include "net/udp/kcp/kcp_session.h"
#include "tools/serialize/pack.h"
#include "net/udp/kcp/udp_cmd.h"
#include "tools/log/nlog.h"
#include "net/asio_base.h"
#include "tools/type.h"
#include "ikcp.h"
#include <atomic>
#include <memory>
#include <map>
#include <mutex>

Classes

class  ngl::asio_kcp
 基于Boost.Asio的UDP套接字KCP收发封装类。 More...

Detailed Description

基于Boost.Asio的UDP套接字KCP收发封装。

本文件定义了asio_kcp类,提供以下功能:

  • 基于Boost.Asio的异步UDP收发
  • 集成KCP协议实现可靠有序传输
  • KCP会话的创建、查找和关闭
  • 原始UDP数据报发送(绕过KCP)
  • 支持阻塞等待UDP回复
  • 内置KCP握手/关闭控制命令注册
  • 线程安全的异步消息队列