Added "heartbeat" for update throttling.

This commit is contained in:
Michael Jumper
2010-09-08 01:43:34 -07:00
parent af0b4d933d
commit 23ddb964b9
7 changed files with 96 additions and 7 deletions

View File

@@ -85,12 +85,6 @@ void guac_start_client(guac_client* client) {
/* VNC Client Loop */
for (;;) {
/* Handle server messages */
if (client->handle_messages) {
client->handle_messages(client);
guac_flush(client->io);
}
wait_result = guac_instructions_waiting(io);
if (wait_result > 0) {
@@ -131,6 +125,12 @@ void guac_start_client(guac_client* client) {
/* Otherwise, retval == 0 implies unfinished instruction */
/* Handle server messages */
if (client->handle_messages) {
client->handle_messages(client);
guac_flush(client->io);
}
}
else if (wait_result < 0)
return;