def data_received(self, data: bytes) -> None:
        """
        socket 收到数据
        """
        # print(data)
        if self._request is None:
            # future = self._loop.create_future()
            self._request = Request(
                cast(asyncio.AbstractEventLoop, self._loop),
                self.complete_handle,
                cast(asyncio.Transport, self._transport),
                charset=self._requset_charset,
            )
            self._request.parser = HttpRequestParser(self._request)
        self._request.feed_data(data)
def data_received ( self , data : bytes ) -> None : if self . _request is None : self . _request = Request ( cast ( asyncio . AbstractEventLoop , self . _loop ) , self . complete_handle , cast ( asyncio . Transport , self . _transport ) , charset = self . _requset_charset , ) self . _request . parser = HttpRequestParser ( self . _request ) self . _request . feed_data ( data )
socket 收到数据