add skynet.context_ptr() & noneblocking socket.close

This commit is contained in:
云风
2013-07-29 21:24:57 +08:00
parent ba22224a4a
commit 1b4b46d271
3 changed files with 17 additions and 0 deletions

View File

@@ -49,6 +49,10 @@ struct socket_pool {
static void
reply(struct skynet_context * ctx, uint32_t source, int session, char * cmd, int sz) {
if (session == 0) {
// don't reply when session == 0
return;
}
if (sz < 0) {
sz = strlen(cmd);
}