Files
archery/cpp_ext/msg_handler.hpp

14 lines
318 B
C++
Raw Normal View History

2026-01-24 15:50:25 +08:00
#pragma once
#include <pybind11/pybind11.h>
#include <pybind11/stl.h> // 支持 std::vector, std::map 等
namespace py = pybind11;
namespace netcore {
// 打包 TCP 数据包
py::bytes make_packet(int msg_type, py::dict body_dict);
// 解包 TCP 数据包
py::tuple parse_packet(py::bytes data);
}