1
This commit is contained in:
parent
56640c5554
commit
7dbabffa09
@ -4,12 +4,18 @@
|
|||||||
|
|
||||||
void MMCache::Init()
|
void MMCache::Init()
|
||||||
{
|
{
|
||||||
|
socket_msg_buf_len_ = 1024 * 1024;
|
||||||
|
udp_msg_buf_len_ = 1024 * 1024;
|
||||||
|
socket_msg_buf_ = (char*)malloc(socket_msg_buf_len_);
|
||||||
|
udp_msg_buf_ = (char*)malloc(udp_msg_buf_len_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MMCache::UnInit()
|
void MMCache::UnInit()
|
||||||
{
|
{
|
||||||
|
free(socket_msg_buf_);
|
||||||
|
socket_msg_buf_ = nullptr;
|
||||||
|
free(udp_msg_buf_);
|
||||||
|
udp_msg_buf_ = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
char* MMCache::AllocSocketMsg(int len)
|
char* MMCache::AllocSocketMsg(int len)
|
||||||
|
@ -22,6 +22,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
char* socket_msg_buf_ = nullptr;
|
char* socket_msg_buf_ = nullptr;
|
||||||
|
int socket_msg_buf_len_ = 1024;
|
||||||
char* udp_msg_buf_ = nullptr;
|
char* udp_msg_buf_ = nullptr;
|
||||||
|
int udp_msg_buf_len_ = 1024;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user