def _receiveOne(self, multiple=0): self._pipeOut = open(self._name_pipe_out, "r") # so, let's read the command from the client then - rendevous data = " " datalens = "" alldata = "" while data != "": data = self._pipeOut.read().rstrip() alldata += data datalens += "%d " % (len(data)) self._pipeOut.close() ## return alldata if multiple: extracted = getConnectedServicesWrapper().parseMessages(alldata) else: extracted = getConnectedServicesWrapper().parseMessage(alldata) return extracted
def _sendOne(self, message): self._pipeIn = open(self._name_pipe_in, "w") ## self._pipeIn.write(message) wrapped = getConnectedServicesWrapper().assembleMessage(message) self._pipeIn.write(wrapped) self._pipeIn.close()