开发一个TCP server ,想尝试使用stream-lua-nginx-module,包含了心跳检查,但是收不到心跳时想断开ngx.req.socket(true)却发现没有方法断开。
stream {
# define a TCP server listening on the port 1234:
server {
listen 1234;
content_by_lua_file luasrc/push.lua;
}
}
或者还有其他的方法recv客户端传过来的消息,同时能检查超时断掉链接吗?
PS:websocket已经实现过了,就不要说换用websocket了。