code: async def poll(self):
          
          try:
              packets = [await asyncio.wait_for(self.queue.get(),
                                                self.server.ping_timeout)]
              self.queue.task_done()
          except (asyncio.TimeoutError, asyncio.CancelledError):
              raise exceptions.QueueEmpty()
          if packets == [None]:
              return []
          try:
              packets.append(self.queue.get_nowait())
              self.queue.task_done()
          except asyncio.QueueEmpty:
              pass
          return packets
docs: Wait for packets to send to the client.