MONGOC_CLIENT...OCKETTIMEOUTMS(3)
π MONGOC_CLIENT_SET_SOCKETTIMEOUTMS π
okay so this is a page from libmongoc (section 3 of the manual, iykyk) and it's literally just one tiny function that changes how long your client waits on a socket before it's like "bestie... hello??" π«Ά
β¨ SYNOPSIS β¨
void
mongoc_client_set_sockettimeoutms (mongoc_client_t *client, int32_t timeoutms);
not me showing you the whole entire signature like it's a fit check π β that's it, that's the vibe, no cap.
πΈ DESCRIPTION πΈ
So the whole gig here is: it changes the sockettimeoutms of the mongoc_client_t. That's the assignment, that's the whole plot, main character energy fr fr β¨
But here's the part you actually need to clock, bestie π β if client was obtained from a mongoc_client_pool_t, then the socket timeout gets restored to the previous value when you call mongoc_client_pool_push(). so like, your cute little change doesn't stick around forever if the client came from a pool. it goes back to how it was. the pool said "not on my watch" π that's just how it is, no drama.
π PARAMETERS π
clientβ amongoc_client_t. the client in question. the one and only. give it a glow-up πtimeoutmsβ the requested timeout value in milliseconds. yes, milliseconds, so do your math carefully bestie, don't come at me with seconds π«Ά
π¦ SEE ALSO π¦
URI Connection Options β go read that one too, it's giving essential lore π
π AUTHOR π
MongoDB, Inc β the icons behind all of this π
π COPYRIGHT π
2009-present, MongoDB, Inc. β that's the whole copyright line, screenshot it, put it on your wall π
so yeah. version 2.5.6, dated Oct 09, 2026, from our friends at MongoDB, Inc β slay, periodt, and remember: when the pool takes the client back, the timeout resets. that's the tea π§β¨π₯
π¦ 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