def sendRequest(self, socket, cmd, args=(), timeout=<NUM_LIT:10>):
self._logger.debug("<STR_LIT>" % (cmd, args))<EOL>t0= time.time()<EOL>self._sendMultiPartWithBarrierTimeout(<EOL>socket,<EOL>[cmd.encode(),<EOL>pickle.dumps(args, Constants.PICKLE_PROTOCOL)],<EOL>timeout)<EOL>toBeReturned= self.receiveWithTimeout(socket, timeout)<EOL>retObj= pickle.loads(toBeReturned, **pickle_options)<EOL>self._logger.debug("<STR_LIT>" % (<EOL>cmd, str(retObj), time.time() - t0))<EOL>if isinstance(retObj, Exception):<EOL><INDENT>raise retObj<EOL><DEDENT>else:<EOL><INDENT>return retObj<EOL><DEDENT>
Perform client request/reply
Request is a ZMQ multipart message:
 - command string
 - pickled argument list
Reply is a pickled object