ost::UnixSocket(3)
π 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 UnixStreamclass SocketPortclass 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 filebacklogβ 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.
π§ FRIENDS AND RELATED FUNCTION DOCUMENTATION π§
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
- 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