summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-12-12 10:55:59 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-12-12 10:55:59 +0100
commit47242ec7ccbfc60fd14276e102abe119f1766d95 (patch)
tree5068f3c0d7c6b83a7bf7f55e70fb473f8406f8dd /python
parent823c57c747c77bda86c670c446d6f857bd2d1585 (diff)
downloaddabmod-47242ec7ccbfc60fd14276e102abe119f1766d95.tar.gz
dabmod-47242ec7ccbfc60fd14276e102abe119f1766d95.tar.bz2
dabmod-47242ec7ccbfc60fd14276e102abe119f1766d95.zip
Increase YAML-RPC packet size
Diffstat (limited to 'python')
-rw-r--r--python/lib/yamlrpc.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/python/lib/yamlrpc.py b/python/lib/yamlrpc.py
index d963601..d4e744a 100644
--- a/python/lib/yamlrpc.py
+++ b/python/lib/yamlrpc.py
@@ -23,6 +23,9 @@
"""yamlrpc is json-rpc, except that it's yaml and not json."""
+# This maybe won't work over ethernet, but for localhost it's ok
+UDP_PACKETSIZE = 2048
+
# Same as jsonrpc version we're aiming to mirror in YAML
YAMLRPC_VERSION = "2.0"
@@ -80,7 +83,7 @@ class Socket:
def receive_response(self, expected_msg_id: int):
try:
- data, addr = self.socket.recvfrom(512)
+ data, addr = self.socket.recvfrom(UDP_PACKETSIZE)
except socket.timeout as to:
raise TimeoutError("Timeout: " + str(to))
@@ -117,7 +120,7 @@ class Socket:
def receive_request(self):
try:
- data, addr = self.socket.recvfrom(512)
+ data, addr = self.socket.recvfrom(UDP_PACKETSIZE)
except socket.timeout as to:
raise TimeoutError("Timeout: " + str(to))