I am using websockets_mtc (Thanks Kem).
It appears I need to ping the server to keep the connection alive.
Should I just create a timer and send a ping?
What’s the best practice here?
I am using Aloe 4.1 as for the server ( Thanks TIm D)
TIA
I am using websockets_mtc (Thanks Kem).
It appears I need to ping the server to keep the connection alive.
Should I just create a timer and send a ping?
What’s the best practice here?
I am using Aloe 4.1 as for the server ( Thanks TIm D)
TIA
Using websockets_mtc myself, use a timer to trigger the method ping.
You will also want to check the last time you received a pong, and close the connection if you don’t get one.
I replicated the send timer to come up with the code below,
I have added the code below to the constructor and it seems to work but cause periodic reconnects.
I moved the code to the connect method and it appears I have the same periodic reconnects.
Thoughts?
[code]PingTimer = new Timer
PingTimer.Mode= timer.ModeMultiple
PingTimer.Period =200000
AddHandler PingTimer.Action, WeakAddressOf PingTimer_Action
[/code]