lipp / lua-websockets

Websockets for Lua.
http://lipp.github.com/lua-websockets/
MIT License
396 stars 113 forks source link

Ive been wandering why didnt you guys set a heartbeat (ping pong) #113

Closed Saint-Theana closed 2 years ago

Saint-Theana commented 5 years ago

At the start ,I use a regular ev websocket client ,and I did connected with server,but some time latter,connection closed. When I add folowing code into client_ev.lua,problem solved.

101    elseif opcode == frame.PING then
102          self:send("PONG",frame.PONG);
103          print("respone pong");