Add frame timeout. Reduce frame max duration to 40ms.

This commit is contained in:
Michael Jumper 2013-08-20 21:13:26 -07:00
parent 280622c027
commit 1887102505
4 changed files with 19 additions and 4 deletions

View File

@ -54,7 +54,14 @@
/** /**
* The maximum duration of a frame in milliseconds. * The maximum duration of a frame in milliseconds.
*/ */
#define GUAC_RDP_FRAME_DURATION 80 #define GUAC_RDP_FRAME_DURATION 40
/**
* The amount of time to allow per message read within a frame, in
* milliseconds. If the server is silent for at least this amount of time, the
* frame will be considered finished.
*/
#define GUAC_RDP_FRAME_TIMEOUT 15
/** /**
* Client data that will remain accessible through the guac_client. * Client data that will remain accessible through the guac_client.

View File

@ -260,7 +260,7 @@ int rdp_guac_client_handle_messages(guac_client* client) {
/* Wait again if frame remaining */ /* Wait again if frame remaining */
if (frame_remaining > 0) if (frame_remaining > 0)
wait_result = rdp_guac_client_wait_for_messages(client, wait_result = rdp_guac_client_wait_for_messages(client,
frame_remaining*1000); GUAC_RDP_FRAME_TIMEOUT*1000);
else else
break; break;

View File

@ -47,7 +47,14 @@
/** /**
* The maximum duration of a frame in milliseconds. * The maximum duration of a frame in milliseconds.
*/ */
#define GUAC_VNC_FRAME_DURATION 80 #define GUAC_VNC_FRAME_DURATION 40
/**
* The amount of time to allow per message read within a frame, in
* milliseconds. If the server is silent for at least this amount of time, the
* frame will be considered finished.
*/
#define GUAC_VNC_FRAME_TIMEOUT 15
extern char* __GUAC_CLIENT; extern char* __GUAC_CLIENT;

View File

@ -75,7 +75,8 @@ int vnc_guac_client_handle_messages(guac_client* client) {
/* Wait again if frame remaining */ /* Wait again if frame remaining */
if (frame_remaining > 0) if (frame_remaining > 0)
wait_result = WaitForMessage(rfb_client, frame_remaining*1000); wait_result = WaitForMessage(rfb_client,
GUAC_VNC_FRAME_TIMEOUT*1000);
else else
break; break;