From 450aa07f5fd1b92fa53176dc23784482d18686c3 Mon Sep 17 00:00:00 2001 From: Kaliko Jack Date: Sat, 18 Dec 2021 09:46:36 +0100 Subject: [PATCH] Add cross reference to socket timeout --- doc/source/use.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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). -- 2.39.5