From: Kaliko Jack Date: Sat, 18 Dec 2021 08:46:36 +0000 (+0100) Subject: Add cross reference to socket timeout X-Git-Tag: v0.8.0~7 X-Git-Url: http://git.kaliko.me/?p=python-musicpd.git;a=commitdiff_plain;h=450aa07f5fd1b92fa53176dc23784482d18686c3 Add cross reference to socket timeout --- diff --git a/doc/source/use.rst b/doc/source/use.rst index 29b6e53..b89db3b 100644 --- a/doc/source/use.rst +++ b/doc/source/use.rst @@ -122,7 +122,7 @@ Idle prefixed commands ---------------------- Each command have a *send\_* and a *fetch\_* variant, which allows to -send a MPD command and then fetch the result later. +send a MPD command and then fetch the result later (non-blocking call). This is useful for the idle command: .. code-block:: python @@ -143,6 +143,8 @@ This is useful for the idle command: >>> gobject.io_add_watch(client, gobject.IO_IN, callback) >>> gobject.MainLoop().run() +See also use of :ref:`socket timeout` with idle command. + Fetching binary content (cover art) ----------------------------------- @@ -193,6 +195,8 @@ You can also use `readpicture` command to fetch embedded picture: Refer to `MPD protocol documentation`_ for the meaning of `binary`, `size` and `data`. +.. _socket_timeout: + Socket timeout -------------- @@ -257,7 +261,7 @@ Some explanations: All three commands in the while loop (send_idle, fetch_idle, noidle) are not triggering a socket timeout unless the connection is actually lost (actually it -could also be that MPD took to much time to answer, but MPD taking more than a +could also be that MPD took too much time to answer, but MPD taking more than a couple of seconds for these commands should never occur).