ost::UDPDuplex(3)

πŸ“¦ version 1.8.1, in ubuntu jammy

πŸ’– 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

  • 0 on 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

  • 0 on 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