ost::UnixSocket(3)

πŸ“¦ version 1.8.1, in ubuntu jammy

πŸ’– ost::UnixSocket(3) πŸ’–

okay bestie, welcome to the Library Functions Manual entry for ost::UnixSocket β€” she's from GNU CommonC++ and she is that girl for same-machine, stream-based, connected sessions. grab a boba, we're doing this πŸ§‹βœ¨


🌸 NAME 🌸

ost::UnixSocket β€” Unix domain sockets are used for stream based connected sessions between processes on the same machine.

like. literally just processes on the same machine talking to each other. no network stack, no drama, just vibes πŸ’…


✨ SYNOPSIS ✨

#include <unix.h>

Inherits ost::Socket. yes she's got a whole family tree, she's a nepo baby and we love her for it 🫢

πŸŽ€ Public Member Functions πŸŽ€

  • UnixSocket(const char *pathname, int backlog=5) β€” a Unix domain 'server' is created as a Unix domain socket that is bound to a pathname and that has a backlog queue to listen for connection requests.
  • bool isPendingConnection(timeout_t timeout=TIMEOUT_INF) β€” used to wait for pending connection requests.
  • virtual ~UnixSocket() β€” use base socket handler for ending this socket.

πŸ¦‹ Protected Member Functions πŸ¦‹

  • void close(void)

🌈 Protected Attributes 🌈

  • char *path

⭐ Friends ⭐

  • class UnixStream
  • class SocketPort
  • class unixstream

πŸ’œ Additional Inherited Members πŸ’œ

(they exist, they're inherited, they're doing their thing in the base class, no cap)


πŸ‘‘ DETAILED DESCRIPTION πŸ‘‘

Unix domain sockets are used for stream based connected sessions between processes on the same machine.

An implicit and unique UnixSocket object exists in Common C++ to represent a bound Unix domain socket acting as a 'server' for receiving connection requests. This class is not part of UnixStream because such objects normally perform no physical I/O (read or write operations) other than to specify a listen backlog queue and perform 'accept' operations for pending connections.

like she's not here to read or write, she's here to host. she's the bouncer at the door, not the DJ. main character energy but make it administrative πŸ’…βœ¨

Author

Alex Pavloff alex@pavloff.net

bound server for Unix domain streams and sessions. periodt.


πŸ”₯ CONSTRUCTOR & DESTRUCTOR DOCUMENTATION πŸ”₯

ost::UnixSocket::UnixSocket(const char *pathname, int backlog = 5)

A Unix domain 'server' is created as a Unix domain socket that is bound to a pathname and that has a backlog queue to listen for connection requests. If the server cannot be created, an exception is thrown.

⚠️ bestie. If the server cannot be created, an exception is thrown. she does not do quiet failure, she does not do "it's fine". she throws. be ready to catch it fr fr 😭

Parameters

  • pathname β€” pathname to socket file
  • backlog β€” size of connection request queue.

virtual ost::UnixSocket::~UnixSocket() [virtual]

Use base socket handler for ending this socket.


πŸ’« MEMBER FUNCTION DOCUMENTATION πŸ’«

void ost::UnixSocket::close(void) [protected]

(it's protected, it does the closing thing, that's the whole note, we move πŸŽ€)

bool ost::UnixSocket::isPendingConnection(timeout_t timeout = TIMEOUT_INF) [inline]

Used to wait for pending connection requests. not const -- jfc

References ost::Socket::isPending(), and ost::Socket::pendingInput.


  • friend class SocketPort [friend]
  • friend class UnixStream [friend]
  • friend class unixstream [friend]

the inner circle. the group chat. the ones who get to see the protected stuff πŸ‘€πŸ’–


🌸 MEMBER DATA DOCUMENTATION 🌸

char* ost::UnixSocket::path [protected]


✨ AUTHOR ✨

Generated automatically by Doxygen for GNU CommonC++ from the source code.


aaaand that's the whole page bestie, you ate it, you understood it, you're basically a Unix domain socket server now πŸ’…πŸŒΈ

GNU CommonC++ Β· dated Sun Dec 27 2020 Β· ost::UnixSocket(3) β€” ty for coming to my ted talk, mwah πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from