def METHOD_NAME(self):
    """
    Send the quit message and close the socket.
    See `Connection.close() <https://www.python.org/dev/peps/pep-0249/#Connection.close>`_
    in the specification.
    :raise Error: If the connection is already closed.
    """
    if self._closed:
        raise err.Error("Already closed")
    self._closed = True