def METHOD_NAME(self):
    """
    Sends exit to the Telnet server and closes connection.
    Fires the deferred with the command's output.
    """
    self.sendLine(b"exit")
    self.transport.loseConnection()
    # deferred to signal command's output was fully received
    self.factory.done_deferred.callback(self.response)
    # call the request client callback, if any
    if self.factory.callback:
        self.factory.callback(self.response)