mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
The cluster message never great than 64K now
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
#include <lua.h>
|
#include <lua.h>
|
||||||
#include <lauxlib.h>
|
#include <lauxlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#include "skynet.h"
|
#include "skynet.h"
|
||||||
|
|
||||||
@@ -28,10 +29,7 @@ fill_uint32(uint8_t * buf, uint32_t n) {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
fill_header(lua_State *L, uint8_t *buf, int sz, void *msg) {
|
fill_header(lua_State *L, uint8_t *buf, int sz, void *msg) {
|
||||||
if (sz >= 0x10000) {
|
assert(sz < 0x10000);
|
||||||
skynet_free(msg);
|
|
||||||
luaL_error(L, "request message is too long %d", sz);
|
|
||||||
}
|
|
||||||
buf[0] = (sz >> 8) & 0xff;
|
buf[0] = (sz >> 8) & 0xff;
|
||||||
buf[1] = sz & 0xff;
|
buf[1] = sz & 0xff;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user