[Spice-commits] server/inputs-channel-client.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 2 20:18:39 UTC 2020


 server/inputs-channel-client.h |   13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

New commits:
commit d60cef04e91310e19e23acfafb614696fa1a9ac5
Author: Frediano Ziglio <freddy77 at gmail.com>
Date:   Wed Jun 24 10:55:30 2020 +0100

    inputs-channel-client: Update RECEIVE_BUF_SIZE
    
    For historical reasons this was computed using VDAgent details.
    Provide a more suitable and simple constant.
    
    Signed-off-by: Frediano Ziglio <freddy77 at gmail.com>
    Acked-by: Uri Lublin <ulublin at redhat.com>

diff --git a/server/inputs-channel-client.h b/server/inputs-channel-client.h
index 1b705742..6f13c680 100644
--- a/server/inputs-channel-client.h
+++ b/server/inputs-channel-client.h
@@ -48,18 +48,11 @@ private:
     void handle_migrate_data(uint16_t motion_count);
     void pipe_add_init();
 
-    // TODO: RECEIVE_BUF_SIZE used to be the same for inputs_channel and main_channel
-    // since it was defined once in reds.c which contained both.
-    // Now that they are split we can give a more fitting value for inputs - what
-    // should it be?
     enum {
-        AGENT_WINDOW_SIZE = 10,
-        NUM_INTERNAL_AGENT_MESSAGES = 1,
-
         // approximate max receive message size
-        RECEIVE_BUF_SIZE =
-            (4096 + (AGENT_WINDOW_SIZE + NUM_INTERNAL_AGENT_MESSAGES) *
-                     SPICE_AGENT_MAX_DATA_SIZE)
+        // The largest message from client is "key_scancode" which contains
+        // key pressed or released. 2K is more then enough.
+        RECEIVE_BUF_SIZE = 2048
     };
 
     uint8_t recv_buf[RECEIVE_BUF_SIZE];


More information about the Spice-commits mailing list