From a48cd6471a2d82e5d78e8abe85b065f66a388e11 Mon Sep 17 00:00:00 2001 From: imarom Date: Tue, 1 Dec 2015 03:46:21 -0500 Subject: 1. fixed ZMQ message limitation 2. added some scale yamls for IMIX (300 streams, 1000 streams) 3. return objects are always complex objects (not strings) - for backward compatability 4. some minor adjustments to ZMQ socket timeouts --- .../automation/trex_control_plane/client_utils/jsonrpc_client.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'scripts/automation/trex_control_plane/client_utils') diff --git a/scripts/automation/trex_control_plane/client_utils/jsonrpc_client.py b/scripts/automation/trex_control_plane/client_utils/jsonrpc_client.py index b826f02f..a5789c46 100755 --- a/scripts/automation/trex_control_plane/client_utils/jsonrpc_client.py +++ b/scripts/automation/trex_control_plane/client_utils/jsonrpc_client.py @@ -37,7 +37,7 @@ class BatchMessage(object): msg = json.dumps(self.batch_list) - rc, resp_list = self.rpc_client.send_raw_msg(msg, block = False) + rc, resp_list = self.rpc_client.send_raw_msg(msg) if len(self.batch_list) == 1: return CmdResponse(True, [CmdResponse(rc, resp_list)]) else: @@ -130,7 +130,6 @@ class JsonRpcClient(object): self.socket.send(msg) break except zmq.Again: - sleep(0.1) tries += 1 if tries > 10: self.disconnect() @@ -143,7 +142,6 @@ class JsonRpcClient(object): response = self.socket.recv() break except zmq.Again: - sleep(0.1) tries += 1 if tries > 10: self.disconnect() @@ -223,8 +221,8 @@ class JsonRpcClient(object): except zmq.error.ZMQError as e: return False, "ZMQ Error: Bad server or port name: " + str(e) - self.socket.setsockopt(zmq.SNDTIMEO, 5) - self.socket.setsockopt(zmq.RCVTIMEO, 5) + self.socket.setsockopt(zmq.SNDTIMEO, 1000) + self.socket.setsockopt(zmq.RCVTIMEO, 1000) self.connected = True -- cgit