Refactoring codes
This commit is contained in:
parent
6c42e328ae
commit
da9cae2f35
6
rpc/pb_types.h
Normal file
6
rpc/pb_types.h
Normal file
@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
typedef std::map<int, std::string> MsgTypes_t;
|
@ -1,14 +1,11 @@
|
||||
#include <map>
|
||||
|
||||
#include "pb_util.h"
|
||||
#include "log.h"
|
||||
#include "pb_util.h"
|
||||
#include "pb_types.h"
|
||||
#include "wcf.pb.h"
|
||||
|
||||
#define BUF_SIZE (1024 * 1024)
|
||||
static char buf[BUF_SIZE] = { 0 };
|
||||
|
||||
typedef std::map<int, std::string> MsgTypes_t;
|
||||
|
||||
void log_buffer(uint8_t *buffer, size_t len)
|
||||
{
|
||||
size_t j = sprintf_s(buf, BUF_SIZE, "Encoded message[%ld]: ", len);
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
MsgTypes_t GetMsgTypes()
|
||||
{
|
||||
const std::map<int32_t, std::string> m = { { 0x01, "文字" },
|
||||
const MsgTypes_t m = { { 0x01, "文字" },
|
||||
{ 0x03, "图片" },
|
||||
{ 0x22, "语音" },
|
||||
{ 0x25, "好友确认" },
|
||||
|
@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "pb_types.h"
|
||||
|
||||
typedef std::map<int, std::string> MsgTypes_t;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user