mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
add comment
This commit is contained in:
@@ -15,6 +15,8 @@ static int
|
|||||||
_cb(struct skynet_context * context, void * ud, int type, int session, uint32_t source, const void * msg, size_t sz) {
|
_cb(struct skynet_context * context, void * ud, int type, int session, uint32_t source, const void * msg, size_t sz) {
|
||||||
assert(sz <= 65535);
|
assert(sz <= 65535);
|
||||||
struct client * c = ud;
|
struct client * c = ud;
|
||||||
|
// tmp will be free by gate.
|
||||||
|
// see gate/mread.c : mread_push()
|
||||||
uint8_t *tmp = malloc(sz + 4 + 2);
|
uint8_t *tmp = malloc(sz + 4 + 2);
|
||||||
memcpy(tmp, c->id, 4);
|
memcpy(tmp, c->id, 4);
|
||||||
tmp[4] = (sz >> 8) & 0xff;
|
tmp[4] = (sz >> 8) & 0xff;
|
||||||
|
|||||||
Reference in New Issue
Block a user