mysql_get_socket(3)

πŸ“¦
version 13.0.2 Β· 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

πŸ’– mysql_get_socket(3) πŸ’–

okay so bestie, welcome to MariaDB Connector/C β€” this is the page for mysql_get_socket, and no cap it's a tiny lil icon. ✨


✨ NAME ✨

mysql_get_socket β€” it literally hands you back the descriptor of the socket your current connection is riding on. that's it. that's the whole job. 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <mysql.h>

my_socket mysql_get_socket(MYSQL * mysql);

look at her. one line. main character energy. πŸ’…


🌸 DESCRIPTION 🌸

Returns the descriptor of the socket used for the current connection.

fr fr that's it β€” you got a connection, you want the raw socket number underneath it, she gives it to you. iykyk. πŸŽ€


πŸ“ PARAMETER πŸ“


πŸ‘‘ RETURN VALUE πŸ‘‘

A socket handle β€” yay! πŸ’–

or INVALID_SOCKET (-1) if the socket descriptor could not be determined, e.g. if the connection doesn't use a socket connection.

heads up bestie: -1 / INVALID_SOCKET is the "nope, couldn't find it" answer. like if your connection isn't even a socket connection, don't expect a socket back. 😭

🌈 SEE ALSO 🌈


that's the whole vibe. now go get that socket, queen. πŸ’…βœ¨

~ fin ~ this was Version 3.4 of the page, mysql_get_socket(3), and yes the source/version + date energy is giving legendary. stay slaying, bestie 🫢🌸

πŸ“¦ where this page comes from