TCPIOSocket(3)

πŸ“¦ version 2.3.1, in fedora 43, fedora 44

πŸ’– NAME πŸ’–

TCPIOSocket β€” the icon, the moment, the socket that actually reads and writes your data for you ✨


🌸 SYNOPSIS 🌸

Bestie, listen. TCPIOSocket is a whole class, and she inherits TCPSocket. Periodt.

She's also inherited by TCPClientConnection and TCPServerConnection, so she's basically the cool mom of the family 🫢

✨ Public Member Functions ✨

Like. Every single one of these. No skipping πŸ’…

int read (void *d, int n)
int write (const void *d, int n)
int read_int (int *d, int n)
int write_int (const int *d, int n)
int read_string (std::string &)
int write_string (const std::string &)
int read_int (int &)
int write_int (int)
int read_uint32 (u_int32_t &)
int write_uint32 (u_int32_t)

So you can read and write raw buffers, do the _int thing with both pointer-and-count and reference versions (obsessed with the range honestly), do strings with std::string, and handle u_int32_t too. All ten of them, right there πŸ”₯

πŸ‘‘ Public Member Functions inherited from TCPSocket πŸ‘‘

The generational wealth she got from her parent class, no cap:

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 ()
Note the virtual void close () β€” that one's virtual, so it can be overridden. It's giving polymorphic main character energy πŸ¦‹

πŸŽ€ Additional Inherited Members πŸŽ€

Protected Attributes inherited from TCPSocket

These are protected, so they're family-only. You don't touch them from outside, iykyk:

int socket_
int port_
bool initialized_
bool bound_

🌈 Author 🌈

Literally generated automatically by Doxygen for MPQC from the source code. Not a human, not a bestie, just a robot doing her thing πŸ’€βœ¨


And that's the whole page, babe β€” TCPIOSocket(3) from the Library Functions Manual, brought to you by MPQC Version 2.3.1. Love her, respect her, go read and write some bytes responsibly πŸ’œπŸŽ€

πŸ“¦ where this page comes from