Controller::send 给出一个足够大的缓存,防止溢出

This commit is contained in:
WangQiang 2015-11-30 03:34:58 +00:00
parent 87d1511592
commit 4eec2224fb
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ bool Controller::Send(Message& msg)
// ms需要在外面这里声明否则离开大括号作用域以后变量被销毁导致缓冲区不可用
//Stream ms(len);
byte buf[512];
byte buf[1536]; // 1.5K
Stream ms(buf, ArrayLength(buf));
// 带有负载数据,需要合并成为一段连续的内存
msg.Write(ms);