[99s-extend] Heartbeat?

Loïc Hoguin essen at ninenines.eu
Wed Apr 10 16:38:26 CEST 2013


On 04/10/2013 01:47 PM, Lee Sylvester wrote:
> Hey guys,
>
> So, my bullet websockets are going great.  However, I have a question.  At present, if I don't send any data to or from my websockets for a while, the connection closes after about 10 - 20 seconds.  Therefore, should I send a heartbeat to the client from Erlang to keep this open?  The websockets are for user to user messaging, so it's possible that large periods of inactivity could occur.

Send one from the client if you want it to scale. Bullet provides you 
with one callback that you can use to send anything. If you're using 
JSON then sending {} is generally enough.

-- 
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu



More information about the Extend mailing list