mysql_get_socket(3)
π 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 π
mysqlβ a mysql handle, which was previously allocated bymysql_init(3)and connected bymysql_real_connect(3). so like, don't just hand her a random pointer, she needs the real one that already went throughmysql_init(3)and got hooked up bymysql_real_connect(3). π
π 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_SOCKETis 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
- alpine 3.22: mariadb-doc 11.4.13-r0 Β· GPL-2.0-or-later
- alpine 3.23: mariadb-doc 11.4.13-r0 Β· GPL-2.0-or-later
- alpine 3.24: mariadb-doc 11.8.9-r0 Β· GPL-2.0-only
- arch rolling: mariadb 13.0.2-2 Β· GPL-2.0-only
- arch rolling: mariadb-lts 12.3.3-2 Β· GPL-2.0-only
- centos-stream 10: mariadb-connector-c-doc 3.4.4-2.el10 Β· LGPL-2.1-or-later
- debian trixie: libmariadb-dev 1:11.8.6-0+deb13u1 Β· GPL-2.0-only
- fedora 43: mariadb-connector-c-doc 3.4.5-2.fc43 Β· LGPL-2.1-or-later AND PHP-3.0 AND PHP-3.01
- fedora 43: mariadb-connector-c-doc 3.4.9-2.fc43 Β· LGPL-2.1-or-later AND PHP-3.0 AND PHP-3.01 AND LicenseRef-Fedora-Public-Domain
- fedora 44: mariadb-connector-c-doc 3.4.8-3.fc44 Β· LGPL-2.1-or-later AND PHP-3.0 AND PHP-3.01
- fedora 44: mariadb-connector-c-doc 3.4.9-2.fc44 Β· LGPL-2.1-or-later AND PHP-3.0 AND PHP-3.01 AND LicenseRef-Fedora-Public-Domain
- nixpkgs unstable: mariadb-server 11.8.8
- opensuse-leap 16.0: libmariadb-devel 3.4.9-160000.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libmariadb-devel 3.4.9-160000.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libmariadb-devel 3.4.9-160000.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libmariadb-devel 3.4.9-160000.1.1 Β· LGPL-2.1-or-later
- ubuntu questing: libmariadb-dev 1:11.8.3-1build1
- ubuntu resolute: libmariadb-dev 1:11.8.6-5 Β· GPL-2.0-only
- ubuntu resolute: libmariadb-dev 1:11.8.6-5ubuntu0.1 Β· GPL-2.0-only
- ubuntu stonking: libmariadb-dev 1:11.8.9+ds-4ubuntu2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms