Пример #1
0
 def recv(self):
     self.__oresp = None
     if self.__oreq:
         self.__oresp = PBOneResponse()
         self.__oresp.rtype = SIMPLE_RESPONSE
         self.__oresp.etype = ERROR_NONE
         self.__oresp.gresp.computetime = 1.0
         self.__oresp.gresp.req.servicename = self.__oreq.greq.servicename
         self.__oresp.gresp.req.caller = self.__oreq.greq.caller
         self.__oresp.gresp.req.ipadress = self.__oreq.greq.ipadress
         self.__oresp.simpleresp.boum = ''.join(
             reversed(self.__oreq.simplereq.youpla))
         PBUtils.dumpOneResponse(self.__oresp)
         res = self.__oresp.SerializeToString()
         return res
Пример #2
0
 def send(self, service, msg):
     if msg:
         self.__oreq = PBOneRequest()
         self.__oreq.ParseFromString(msg)
         PBUtils.dumpOneRequest(self.__oreq)