mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 03:53:09 +00:00
add api skynet_socket_pause
This commit is contained in:
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user