ost::UDPDuplex(3)
π NAME π
ost::UDPDuplex β bestie, this is a UDP duplex connection, which lowkey means a bi-directional point-to-point UDP session between two peer hosts. Two-way. Both directions. Slay. β¨
β¨ SYNOPSIS β¨
#include <socket.h>
Inherits ost::UDPTransmit and ost::UDPReceive. Yes bestie, it's giving nepo baby but in a cute inherited-members way π«Ά
π Public Member Functions π
UDPDuplex(const IPV4Address &bind, tpport_t port)β creates a UDP duplex as a pair of UDP simplex objects, bound to alternating and interconnected port addresses πUDPDuplex(const IPV6Address &bind, tpport_t port)Error connect(const IPV4Host &host, tpport_t port)β associates the duplex with a specified peer host β¨Error connect(const IPV6Host &host, tpport_t port)Error disconnect(void)β disassociates this duplex from any host connection. No cap. π¦
π Additional Inherited Members π
π¦ DETAILED DESCRIPTION π¦
okay so, UDP duplex connections implement a bi-directional point-to-point UDP session between two peer hosts. It's literally a whole conversation, both directions, just the two of you. π
Usually you'd be running two UDP sockets on alternating port addresses, and the reason is genuinely important: that's how you make sure the sender and receiver data doesn't collide or echo back at you. Not me getting my own packets back like a boomerang π A UDP Duplex is commonly used for full duplex real-time streaming of UDP data between hosts. Streaming girlies, this one's for you. π
π« Author π«
- David Sugar
dyfet@ostel.comβ king behavior, we stan π
β Unreliable Datagram Peer Associations. β
fr fr, "unreliable" is right there in the name β that's just what UDP is, bestie, don't come for me π
πΈ CONSTRUCTOR & DESTRUCTOR DOCUMENTATION πΈ
π ost::UDPDuplex::UDPDuplex (const IPV4Address & bind, tpport_t port) π
Create a UDP duplex as a pair of UDP simplex objects bound to alternating and interconnected port addresses. It's giving duo. It's giving dynamic duo. π
Parameters
bindβ address to bind this socket to.portβ number to bind sender.
π ost::UDPDuplex::UDPDuplex (const IPV6Address & bind, tpport_t port) π
(the IPv6 twin, no extra deets in the source, iykyk) π
π MEMBER FUNCTION DOCUMENTATION π
β¨ Error ost::UDPDuplex::connect (const IPV4Host & host, tpport_t port) β¨
Associate the duplex with a specified peer host. Both the sender and the receiver will be interconnected with the remote host β so like, the whole vibe gets linked up, not just one half. π«Ά
Returns
0on success, error code on error. (yes bestie, zero is the good one here π)
Parameters
hostβ address to connect socket to.portβ number to connect socket to.
β¨ Error ost::UDPDuplex::connect (const IPV6Host & host, tpport_t port) β¨
(same energy, IPv6 flavor) π
π¦ Error ost::UDPDuplex::disconnect (void) π¦
Disassociate this duplex from any host connection.
β οΈ Important, bestie: no data should be read or written until a connection is established. Do not try it. I'm so serious. π
Returns
0on success, error code on error.
π AUTHOR π
Generated automatically by Doxygen for GNU CommonC++ from the source code. Robots wrote the docs, a human wrote the sockets, and honestly? iconic. π
okay that's the whole page bestie, and the sign-off is giving GNU CommonC++, Sun Dec 27 2020 β this manual page was literally written for ost::UDPDuplex(3) and it ATE. go forth and stream, no cap, periodt. πβ¨π¦π
π¦ where this page comes from
- ubuntu jammy: libcommoncpp2-doc 1.8.1-10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms