MONGOC_SOCKET_GETSOCKNAME(3)
π
mongoc_socket_getsockname π
okay so bestie, this is the MONGOC_SOCKET_GETSOCKNAME(3) page from libmongoc, and itβs lowkey all about asking a socket for its name. no cap. itβs giving tiny networking moment, and honestly? iconic. π
πΈ SYNOPSIS πΈ
int
mongoc_socket_getsockname (mongoc_socket_t *sock,
struct sockaddr *addr,
mongoc_socklen_t *addrlen);
π PARAMETERS π
sockβ amongoc_socket_t. the socket in question, the main character of this function πaddrβ astruct sockaddr. this is where the result gets stored, bestie π«Άaddrlenβ amongoc_socklen_t. when you call this, it should be the size ofaddrβ¨
π¦ DESCRIPTION π¦
so this function retrieves the socket name for sock, and the result is stored in addr. when you call it, addrlen should be the size of the addr. thatβs the vibe check: pass the right size, get the socket name, slay. β¨
π₯ RETURNS π₯
0if successful β ate π- otherwise
-1, anderrnois set β not the win we wanted, but thatβs the rule π
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
π mwah! this page is from libmongoc version 2.5.6, dated Oct 09, 2026. periodt. πβ¨
π¦ 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