Esempio n. 1
0
 async def handle_connection(self, r, w):
     asyncio_utils.set_task_debug_info(
         asyncio.current_task(),
         name=f"Proxyserver.handle_connection",
         client=w.get_extra_info('peername'),
     )
     handler = ProxyConnectionHandler(self.master, r, w, self.options)
     await handler.handle_client()
Esempio n. 2
0
 async def handle_connection(self, r, w):
     peername = w.get_extra_info('peername')
     asyncio_utils.set_task_debug_info(
         asyncio.current_task(),
         name=f"Proxyserver.handle_connection",
         client=peername,
     )
     handler = ProxyConnectionHandler(self.master, r, w, self.options)
     self._connections[peername] = handler
     try:
         await handler.handle_client()
     finally:
         del self._connections[peername]
Esempio n. 3
0
async def ttask():
    asyncio_utils.set_task_debug_info(
        asyncio.current_task(),
        name="newname",
    )
    await asyncio.sleep(999)