xcb_list_hosts(3)

πŸ“¦
version 1.17.0 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– xcb_list_hosts β€” bestie, let's peek at the X server's host list πŸ’–

Okay so this is a page from libxcb, the C bindings for XCB (that's the X protocol thingy that talks to your X11 server). This one's called xcb_list_hosts, and no cap, the NAME section up top is literally empty β€” iconic of it, honestly. The header line said xcb_list_hosts(3) and it lives in section 3 of the manual (that's the library-functions girlies), and the whole thing got generated from xproto.xml. Let's get into it πŸ¦‹


✨ SYNOPSIS ✨

First things first, you gotta pull in the header:

#include <xcb/xproto.h>

πŸŽ€ Request function

xcb_list_hosts_cookie_t xcb_list_hosts(xcb_connection_t *conn,

(Yes, the original cuts off right there mid-signature. We don't fix it, we don't question it, we simply respect the vibe. πŸ’…)

🧚 Reply datastructure

typedef struct xcb_list_hosts_reply_t {
    uint8_t  response_type;
    uint8_t  mode;
    uint16_t sequence;
    uint32_t length;
    uint16_t hosts_len;
    uint8_t  pad0[22];
} xcb_list_hosts_reply_t;

🌸 Reply function

xcb_list_hosts_reply_t *xcb_list_hosts_reply(xcb_connection_t *conn,
       xcb_list_hosts_cookie_t cookie, xcb_generic_error_t **e);

⭐ Reply accessors

int xcb_list_hosts_hosts_length(const xcb_list_hosts_reply_t *reply);

xcb_host_iterator_t xcb_list_hosts_hosts_iterator(const
       xcb_list_hosts_reply_t *reply);

🫢 REQUEST ARGUMENTS 🫢

  • conn β€” The XCB connection to X11. Your lil hotline to the server, bestie. Without it we're just screaming into the void. πŸ“ž

πŸ’œ REPLY FIELDS πŸ’œ

  • response_type β€” The type of this reply, which in this case is XCB_LIST_HOSTS. This field also shows up in the xcb_generic_reply_t, so you can use it to tell your replies apart from each other. It's giving name tag at a party. 🏷️
  • sequence β€” The sequence number of the last request processed by the X11 server. Keeping receipts, fr fr.
  • length β€” The length of the reply, in words. And heads up, a word here is 4 bytes. Not a vibe, just a fact. πŸ“
  • mode β€” TODO: NOT YET DOCUMENTED. Mystery behaviour, we love that for us. πŸ™ˆ
  • hosts_len β€” TODO: NOT YET DOCUMENTED. Also a mystery. The docs said "figure it out" and left. 😭

🌈 DESCRIPTION 🌈

Nothing here, bestie. The DESCRIPTION section is empty. Not a single word. We respect the silence. 🀐


πŸ”₯ RETURN VALUE πŸ”₯

Returns an xcb_list_hosts_cookie_t. Errors have to be handled when calling the reply function xcb_list_hosts_reply.

If you'd rather handle errors in the event loop instead, use xcb_list_hosts_unchecked. See xcb-requests(3) for details β€” that's the page that explains the whole checked/unchecked situation, iykyk.


πŸ’€ ERRORS πŸ’€

This request does never generate any errors. Zero. Zilch. Not one. Chillest request in the whole protocol, honestly. 😌

πŸ‘‘ SEE ALSO πŸ‘‘

Nothing listed. Empty. We move. πŸšΆβ€β™€οΈ


πŸ“ AUTHOR πŸ“

Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. (So if something's off, that's who you email β€” be nice, they're doing their best 🫢)


And that's the whole page, babe. This one came to you from X Version 11, libxcb 1.17.0, dated xcb_list_hosts(3) β€” slay, periodt, go read the header file. πŸ’…βœ¨