Supported connection.close() and error, close events.