Skip to content

Commit

Permalink
* ensure we forward packets as quickly as they come in
Browse files Browse the repository at this point in the history
* bump max packet size based on "max_desktop_size"

git-svn-id: https://xpra.org/svn/Xpra/trunk@4537 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 17, 2013
1 parent 49a7188 commit 2fae35a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/xpra/server/proxy_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down Expand Up @@ -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])
Expand All @@ -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]
Expand All @@ -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)
Expand Down

0 comments on commit 2fae35a

Please sign in to comment.