def connection_made(self, transport: asyncio.transports.Transport):
        """连接建立起来触发的回调函数.

        用于设定一些参数,并将监听任务放入事件循环,如果设置了timeout,也会将timeout_callback放入事件循环

        Parameters:
            transport (asyncio.Transports): - 连接的传输对象

        """
        self._transport = transport
        self._remote_host = self._transport.get_extra_info('peername')
        self._extra = {"client": str(self._remote_host)}
        self.connections.add(self)

        self._stream_reader = asyncio.StreamReader(loop=self._loop)
        self._stream_writer = asyncio.StreamWriter(transport, self,
                                                   self._stream_reader,
                                                   self._loop)
        super().connection_made(transport)
        if self.timeout:
            self._timeout_handler = self._loop.call_soon(
                self.timeout_callback)
        self._handlertask = asyncio.ensure_future(self.query_handler())
        if self.debug:
            access_logger.info("connected", extra=self._extra)
def connection_made ( self , transport : asyncio . transports . Transport ) : self . _transport = transport self . _remote_host = self . _transport . get_extra_info ( 'peername' ) self . _extra = { "client" : str ( self . _remote_host ) } self . connections . add ( self ) self . _stream_reader = asyncio . StreamReader ( loop = self . _loop ) self . _stream_writer = asyncio . StreamWriter ( transport , self , self . _stream_reader , self . _loop ) super ( ) . connection_made ( transport ) if self . timeout : self . _timeout_handler = self . _loop . call_soon ( self . timeout_callback ) self . _handlertask = asyncio . ensure_future ( self . query_handler ( ) ) if self . debug : access_logger . info ( "connected" , extra = self . _extra )
连接建立起来触发的回调函数.

        用于设定一些参数,并将监听任务放入事件循环,如果设置了timeout,也会将timeout_callback放入事件循环

        Parameters:
            transport (asyncio.Transports): - 连接的传输对象