transm/util/util.h
2024-12-11 17:00:59 +08:00

33 lines
666 B
C++

#ifndef TRANSM_UTIL
#define TRANSM_UTIL
#include <spdlog/sinks/rotating_file_sink.h>
#include <spdlog/sinks/stdout_color_sinks.h>
#include <spdlog/spdlog.h>
#include "of_util.h"
using namespace ofen;
std::shared_ptr<spdlog::logger> get_logger(const std::string& mark, const std::string& log_file);
class CFrameBuffer
{
public:
CFrameBuffer();
~CFrameBuffer();
};
/*
【 transm TCP 数据协议 】
header 2 char: 0xFF 0xFE
type 2 char:
len 4 char:
data xxxxx:
tail 2 char: 0xFF 0xFF
*/
class CTransProtocal
{
public:
CTransProtocal();
~CTransProtocal();
public:
CFrameBuffer* parse(CMutBuffer& buffer);
};
#endif