(self)
return line.decode('ascii', 'replace')
Return the next line from the buffer as a string.

        Reads bytes until it encounters newline chars, and returns the bytes
        ascii decoded, newline chars are excluded from the return value.
        Blocks until: newline chars are read OR socket is closed.
Return the next line from the buffer as a string.
Return the next line from the buffer as a string .
def _buffered_read_line_as_ascii(self):
        """Return the next line from the buffer as a string.

        Reads bytes until it encounters newline chars, and returns the bytes
        ascii decoded, newline chars are excluded from the return value.
        Blocks until: newline chars are read OR socket is closed.
        """
        newline = '\r\n'.encode('ascii')
        while newline not in self.__buffer:
            temp = self.__socket.recv(1024)
            if not temp:
                break
            self.__buffer += temp

        if not self.__buffer:
            return None

        try:
            index = self.__buffer.index(newline)
        except ValueError:
            raise InvalidHeaderError('Header line not terminated')

        line = self.__buffer[:index]
        self.__buffer = self.__buffer[index+len(newline):]
        return line.decode('ascii', 'replace')
def _buffered_read_line_as_ascii ( self ) : newline = '\r\n' . encode ( 'ascii' ) while newline not in self . __buffer : temp = self . __socket . recv ( 1024 ) if not temp : break self . __buffer += temp if not self . __buffer : return None try : index = self . __buffer . index ( newline ) except ValueError : raise InvalidHeaderError ( 'Header line not terminated' ) line = self . __buffer [ : index ] self . __buffer = self . __buffer [ index + len ( newline ) : ] return line . decode ( 'ascii' , 'replace' )