|
TCP keep-alive is to detect a broken connection. It can be enabled with the LuaSocket library and setsocket( 'keepalive', true ) WebSocket keep alive (PING - PONG) does the same two layers higher. This may be implemented in the WebSocket library or application.I see a few lua websocket client libs out there. Please let me know if there is one with KEEPALIVE support that is recommended.
The latter is the more reliable operation as TCP keep-alive may be spoofed by, e.g. routers.
-- Oliver