'Sets a callback that will be run when the connection is closed.
.. deprecated:: 4.0
Use `.HTTPMessageDelegate.on_connection_close` instead.'

def set_close_callback(self, callback):

    self._close_callback = stack_context.wrap(callback)
