122 lines
3.3 KiB
HTML
122 lines
3.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of SD_BUS_GET_N_QUEUED_READ</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>SD_BUS_GET_N_QUEUED_READ</H1>
|
|
Section: sd_bus_get_fd (3)<BR>Updated: <BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
sd_bus_get_n_queued_read, sd_bus_get_n_queued_write - Get the number of pending bus messages in the read and write queues of a bus connection object
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<P>
|
|
<B>
|
|
</B><PRE>
|
|
#include <<A HREF="file:///usr/include/systemd/sd-bus.h">systemd/sd-bus.h</A>>
|
|
</PRE>
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">
|
|
<B>int sd_bus_get_n_queued_read(sd_bus *</B><I>bus</I><B>, uint64_t *</B><I>ret</I><B>);</B>
|
|
|
|
<DT id="2">
|
|
<B>int sd_bus_get_n_queued_write(sd_bus *</B><I>bus</I><B>, uint64_t *</B><I>ret</I><B>);</B>
|
|
|
|
</DL>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
<B>sd_bus_get_n_queued_read()</B>
|
|
<DD>may be used to query the number of bus messages in the read queue of a bus connection object. The read queue contains all messages read from the transport medium (e.g. network socket) but not yet processed locally. The function expects two arguments: the bus object to query, and a pointer to a 64bit counter variable to write the current queue size to. Use
|
|
<B>sd_bus_process()</B>
|
|
in order to process queued messages, i.e. to reduce the size of the read queue (as well as, in fact, the write queue, see below).
|
|
<P>
|
|
|
|
Similarly,
|
|
<B>sd_bus_get_n_queued_write()</B>
|
|
may be used to query the number of currently pending bus messages in the write queue of a bus connection object. The write queue contains all messages enqueued into the connection with a call such as
|
|
<B>sd_bus_send()</B>
|
|
but not yet written to the transport medium. The expected arguments are similar to
|
|
<B>sd_bus_get_n_queued_read()</B>. Here too, use
|
|
<B>sd_bus_process()</B>
|
|
to reduce the size of the write queue. Alternatively, use
|
|
<B>sd_bus_flush()</B>
|
|
to synchronously write out any pending bus messages until the write queue is empty.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>RETURN VALUE</H2>
|
|
|
|
<P>
|
|
|
|
On success, these functions return 0 or a positive integer. On failure, they return a negative errno-style error code.
|
|
<A NAME="lbAF"> </A>
|
|
<H3>Errors</H3>
|
|
|
|
<P>
|
|
|
|
Returned errors may indicate the following problems:
|
|
<P>
|
|
|
|
<B>-ECHILD</B>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
The bus connection was created in a different process.
|
|
</DL>
|
|
|
|
<A NAME="lbAG"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+systemd">systemd</A></B>(1),
|
|
<B><A HREF="/cgi-bin/man/man2html?3+sd-bus">sd-bus</A></B>(3),
|
|
<B><A HREF="/cgi-bin/man/man2html?3+sd_bus_process">sd_bus_process</A></B>(3),
|
|
<B><A HREF="/cgi-bin/man/man2html?3+sd_bus_send">sd_bus_send</A></B>(3),
|
|
<B><A HREF="/cgi-bin/man/man2html?3+sd_bus_flush">sd_bus_flush</A></B>(3)
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="4"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="5"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="6"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="7"><A HREF="#lbAE">RETURN VALUE</A><DD>
|
|
<DL>
|
|
<DT id="8"><A HREF="#lbAF">Errors</A><DD>
|
|
</DL>
|
|
<DT id="9"><A HREF="#lbAG">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:54 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|