Some hints:
* Don't use the event loop from the main thread in another thread. Libuv is 
not-thread safe.
* You don't need to create a thread to execute the heartbeat, use a timer 
(uv_timer) to repeat the request.
* Your code must support connection drop and reconnect even in http 1.1. Send a 
header Connection: keep-alive to keep the connection open for Http 1.0 server.
* every time that the timer runs check  connection dropped and reconnect it. 
When connected or if already connected send the heartbeat requested.
* You detect a connection dropped by status on uv_read_start callback.

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/libuv/a3016061-5673-47f6-bfd1-d08614be9ee2o%40googlegroups.com.

Reply via email to