From 2fae35aacf877e9f1a2f0abcb7aa997a2f4e5640 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 17 Oct 2013 14:43:32 +0000 Subject: [PATCH] * ensure we forward packets as quickly as they come in * bump max packet size based on "max_desktop_size" git-svn-id: https://xpra.org/svn/Xpra/trunk@4537 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/server/proxy_server.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/xpra/server/proxy_server.py b/src/xpra/server/proxy_server.py index 20b1ac6b06..31a99a84f9 100644 --- a/src/xpra/server/proxy_server.py +++ b/src/xpra/server/proxy_server.py @@ -21,6 +21,7 @@ from xpra.scripts.server import deadly_signal from xpra.net.protocol import Protocol, new_cipher_caps, get_network_caps from xpra.os_util import Queue, SIGNAMES +from xpra.util import typedict PROXY_QUEUE_SIZE = int(os.environ.get("XPRA_PROXY_QUEUE_SIZE", "10")) @@ -336,7 +337,7 @@ def get_server_packet(self): #server wants a packet p = self.server_packets.get() debug("sending to server: %s", p[0]) - return p, + return p, None, None, self.server_packets.qsize()>0 def queue_client_packet(self, packet): debug("queueing client packet: %s", packet[0]) @@ -347,7 +348,7 @@ def get_client_packet(self): #server wants a packet p = self.client_packets.get() debug("sending to client: %s", p[0]) - return p, + return p, None, None, self.client_packets.qsize()>0 def process_server_packet(self, proto, packet): packet_type = packet[0] @@ -356,7 +357,11 @@ def process_server_packet(self, proto, packet): self.stop("server connection lost", proto) return elif packet_type=="hello": - caps = self.filter_server_caps(packet[1]) + c = typedict(packet[1]) + maxw, maxh = c.intpair("max_desktop_size", (4096, 4096)) + proto.max_packet_size = maxw*maxh*4 + + caps = self.filter_server_caps(c) #add new encryption caps: if self.cipher: auth_caps = new_cipher_caps(self.client_protocol, self.cipher, self.encryption_key)