add api skynet_socket_pause

This commit is contained in:
Cloud Wu
2020-08-10 10:57:59 +08:00
parent c35c8f173b
commit a4dc6b9094
6 changed files with 64 additions and 12 deletions

View File

@@ -611,6 +611,14 @@ lstart(lua_State *L) {
return 0;
}
static int
lpause(lua_State *L) {
struct skynet_context * ctx = lua_touserdata(L, lua_upvalueindex(1));
int id = luaL_checkinteger(L, 1);
skynet_socket_pause(ctx,id);
return 0;
}
static int
lnodelay(lua_State *L) {
struct skynet_context * ctx = lua_touserdata(L, lua_upvalueindex(1));
@@ -794,6 +802,7 @@ luaopen_skynet_socketdriver(lua_State *L) {
{ "lsend", lsendlow },
{ "bind", lbind },
{ "start", lstart },
{ "pause", lpause },
{ "nodelay", lnodelay },
{ "udp", ludp },
{ "udp_connect", ludp_connect },