async def request_response(self, payload: Payload) -> Awaitable[Payload]:
     await asyncio.sleep(self._delay.total_seconds())
     return future_from_payload(Payload(payload.data + (' server %d' % self._server_id).encode(), payload.metadata))
Beispiel #2
0
 async def request_response(self, request: Payload):
     return future_from_payload(request)