Websocket CIO client and netty websocket server - both hides under the hood PING/PONG packets, right?
I see this ping pong packets via wireshark but this code never was invoked:
I want to use ping/pong packets to determine user online status. it is correct way or no?
📝 1
e
e5l
04/25/2018, 9:13 AM
Yep. There are two WebSocket session types in ktor-client: default and raw. Default session handles ping/pong. So you just can set the ping/pong timeout
n
Nail Gilaziev
04/25/2018, 9:48 AM
wow, cool. Thanks for answer. Now I will try to work with Raw session.
Nail Gilaziev
04/25/2018, 12:54 PM
hmm, theoretically, for tracking user online status, maybe it is a good idea that defaultWebSocket session expose outside the time when last packet arrived from TCP connection?
No need to implement pinger/ponger if implementing raw websocketsession.