TCPSocket(3)
π TCPSocket π
okay bestie, welcome to the TCPSocket page from the Library Functions Manual β yes it's a C++ class, yes it's giving networking main character energy, and yes we're gonna go through every single line together because nothing gets skipped around here, periodt. π
β¨ NAME β¨
TCPSocket β that's it, that's the name, she's literally just her. π
πΈ SYNOPSIS πΈ
Inherited by TCPIOSocket, and TCPServerSocket.
so likeβ¦ this girl is a base class. she's the blueprint, the blueprint-iest blueprint, and TCPIOSocket and TCPServerSocket are her daughters who inherited everything from her. nepo babies? no bestie, legacy babies. π
π¦ Public Member Functions π¦
void create ()
void bind (u_int16_t port_begin, u_int16_t port_fence)
int port ()
u_int32_t addr ()
bool initialized ()
bool bound ()
virtual void close ()
these are the public ones, meaning everyone can call them, no gatekeeping here, we're an open-invite class:
void create ()β makes the socket happen. it's giving β¨manifestationβ¨ but for file descriptors.void bind (u_int16_t port_begin, u_int16_t port_fence)β takes a port_begin and a port_fence, bothu_int16_t, and binds. fence = the end of the range, bestie, we're picking a port from between them. π―int port ()β hands you back the port as anint. simple. clean. iconic.u_int32_t addr ()β returns the address as au_int32_t. note it's not an int, it's au_int32_t, respect the type bestie, she's specific. πbool initialized ()β true/false, is she initialized or is she just a girl standing in front of a socket? π«Άbool bound ()β true/false, has she been bound yet. vibe check, but for binding status. πvirtual void close ()β the goodbye one. it'svirtual, so subclasses get to override how they say bye. no cap. π
π§ Protected Attributes π§
int socket_
int port_
bool initialized_
bool bound_
protected means family only, bestie β not for the outside world, just for this class and her descendants:
int socket_β the actual socket, stored as anint. the whole point of the whole thing. the moment. πint port_β the port, also anint. note the little trailing underscore, that's her ~private name~, don't come for her. πbool initialized_β the flag tracking whetherinitialized()is gonna return true or false. it's the source of truth, fr fr.bool bound_β same deal, but forbound(). the real one behind the curtain. π¦
π Author π
Generated automatically by Doxygen for MPQC from the source code.
so like, no human wrote this by hand bestie, Doxygen just read the source code and produced the page. respect the automation, honestly she ate. β¨
okay that's the whole page, we did it, we read every single line together and no detail was harmed in the making of this rewrite. π stay bound, stay initialized, and remember: close() your sockets, bestie. π«Ά
MPQC Β· Version 2.3.1 Β· TCPSocket(3) β mwah, that's a wrap, ily, bye!! ππ¦π
π¦ where this page comes from
- fedora 43: mpqc-devel 2.3.1-65.fc43 Β· GPL-2.0-or-later AND LicenseRef-Callaway-LGPLv2+
- fedora 43: mpqc-devel 2.3.1-65.fc43 Β· GPL-2.0-or-later AND LicenseRef-Callaway-LGPLv2+
- fedora 44: mpqc-devel 2.3.1-67.fc44 Β· GPL-2.0-or-later AND LicenseRef-Callaway-LGPLv2+
- fedora 44: mpqc-devel 2.3.1-67.fc44 Β· GPL-2.0-or-later AND LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms