Make all async I/O object referenced.
Since it's hard to control lifespan of an object in asynchronous environment, we
should make all AsyncXxx objects a referenced objecst, that will self-destruct
when its reference count drops to zero, indicating that the last client that
used the object has abandoned it.
Change-Id: I6f8194aa14e52a23a8772d827583782989654504
diff --git a/android/async-utils.h b/android/async-utils.h
index 6d460c2..30dfbe3 100644
--- a/android/async-utils.h
+++ b/android/async-utils.h
@@ -225,4 +225,12 @@
AsyncStatus
asyncConnector_run(AsyncConnector* ac);
+/* Stops connection in progress.
+ * Return:
+ * 0 if connection in progress has been stopped, or -1 if no connection has been
+ * in progress.
+ */
+int
+asyncConnector_stop(AsyncConnector* ac);
+
#endif /* ANDROID_ASYNC_UTILS_H */