From 400faadc0deeb352d78291857cd6a2c8b8c528d3 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Tue, 17 Apr 2018 15:10:40 +0200 Subject: [PATCH] Document new async behaviour a bit --- docs/index.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 5a1254d..f463156 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -725,13 +725,17 @@ Streaming --------- These functions allow access to the streaming API. -If async is False, these methods block forever (or until an -exception is raised). +If `async` is False, these methods block forever (or until an exception is raised). -If async is True, the listener will listen on another thread and these methods -will return a handle corresponding to the open connection. The -connection may be closed at any time by calling the handles close() method, and the -status of the connection can be verified calling is_alive() on the handle. +If `async` is True, the listener will listen on another thread and these methods +will return a handle corresponding to the open connection. If, in addition, `async_reconnect` is True, +the thread will attempt to reconnect to the streaming API if any errors are encountered, waiting +`async_reconnect_wait_sec` seconds between reconnection attempts. Note that no effort is made +to "catch up" - toots made while the connection is broken will not be received. + +The connection may be closed at any time by calling the handles close() method. The +current status of the handler thread can be checked with the handles is_alive() function, +and the streaming status can be checked by calling is_receiving(). The streaming functions take instances of `StreamListener` as the `listener` parameter. A `CallbackStreamListener` class that allows you to specify function callbacks