transm/util/util.h

33 lines
666 B
C
Raw Normal View History

2024-12-11 10:22:14 +08:00
#ifndef TRANSM_UTIL
#define TRANSM_UTIL
#include <spdlog/sinks/rotating_file_sink.h>
#include <spdlog/sinks/stdout_color_sinks.h>
#include <spdlog/spdlog.h>
2024-12-11 17:00:59 +08:00
#include "of_util.h"
2024-12-11 10:22:14 +08:00
2024-12-11 17:00:59 +08:00
using namespace ofen;
2024-12-11 10:22:14 +08:00
std::shared_ptr<spdlog::logger> get_logger(const std::string& mark, const std::string& log_file);
2024-12-11 17:00:59 +08:00
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);
};
2024-12-11 10:22:14 +08:00
#endif