MONGOC_URI_GET_HOSTS(3)
π MONGOC_URI_GET_HOSTS π
okay so bestie, welcome to libmongoc's very own host-list grabber β the mongoc_uri_get_hosts page, here to hand you the whole squad of hosts hiding inside your URI. no cap, it's a short one. slay. β¨
β¨ SYNOPSIS β¨
const mongoc_host_list_t *
mongoc_uri_get_hosts (const mongoc_uri_t *uri);
that's it. that's the whole vibe. one function, takes a URI, gives you hosts. iconic. π
πΈ PARAMETERS πΈ
uriβ amongoc_uri_t. the URI you're snooping through. literally just hand it over and let the function do its thing. π«Ά
π¦ DESCRIPTION π¦
so what does it actually do? it fetches a linked list of the hosts that were defined in the URI β y'know, that comma-separated host section you typed in. it's giving "here's everyone who showed up to the party" energy. π
β RETURNS β
you get back a linked list of mongoc_host_list_t structures. and listen β do not modify them, do not free them. like, hands off, bestie. they're not yours to mess with. π
and if this URI's scheme is "mongodb+srv://"? it just hits you with NULL. no hosts for you in that case. the way that scheme said "not today" ππ
highkey important: thatNULLon"mongodb+srv://"is just how it is β don't go expecting a list there, fr fr.
π AUTHOR π
MongoDB, Inc. they wrote it, they get the credit. periodt. π
π COPYRIGHT π
2009-present, MongoDB, Inc. β all the legal sparkle, kept exactly as-is. π§
and that's the whole page, bestie! π this little gem is from libmongoc version 2.5.6, dated Oct 09, 2026 β screenshot it, memorize it, live by it. mwah π
β¨
π¦ where this page comes from
- epel 10: mongo-c-driver-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms