mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
add gate close
This commit is contained in:
@@ -120,6 +120,10 @@ _ctrl(struct skynet_context * ctx, struct gate * g, const void * msg, int sz) {
|
|||||||
skynet_command(ctx,"TIMEOUT","0");
|
skynet_command(ctx,"TIMEOUT","0");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (memcmp(command, "close", i) == 0) {
|
||||||
|
mread_close_listen(g->pool);
|
||||||
|
return;
|
||||||
|
}
|
||||||
skynet_error(ctx, "[gate] Unkown command : %s", command);
|
skynet_error(ctx, "[gate] Unkown command : %s", command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ struct mread_pool;
|
|||||||
|
|
||||||
struct mread_pool * mread_create(uint32_t addr, int port , int max , int buffer);
|
struct mread_pool * mread_create(uint32_t addr, int port , int max , int buffer);
|
||||||
void mread_close(struct mread_pool *m);
|
void mread_close(struct mread_pool *m);
|
||||||
|
void mread_close_listen(struct mread_pool *self);
|
||||||
|
|
||||||
int mread_poll(struct mread_pool *m , int timeout);
|
int mread_poll(struct mread_pool *m , int timeout);
|
||||||
void * mread_pull(struct mread_pool *m , int size);
|
void * mread_pull(struct mread_pool *m , int size);
|
||||||
|
|||||||
Reference in New Issue
Block a user