ost::unixstream(3)
π ost::unixstream β Library Functions Manual π
okay bestie, sit down, hydrate, and let's talk about ost::unixstream(3) β¨ this is a manual page from the Library Functions Manual and it's literally about a more natural C++ unixstream class for use by non-threaded applications. yes we're doing C++ today. slay.
πΈ NAME πΈ
ost::unixstream β a more natural C++ unixstream class for use by non-threaded applications. periodt. π
π¦ SYNOPSIS π¦
#include <unix.h>
Inherits ost::UnixStream. yes bestie, it's giving inheritance. iconic behavior.
β¨ Public Member Functions β¨
unixstream ()β construct an unopened'tcpstream'object. it's baby. it's not connected to anyone yet. main character pre-glow-up.unixstream (const char *pathname, int buffer=512)β construct and'open'(connect) the tcp stream to a remote socket. we love a constructor that does the most. πunixstream (UnixSocket &unixsock, int buffer=512)β construct'accept'(connect) the tcp stream through a server. mutuals only. π«Άvoid open (const char *pathname, int buffer=512)β open a tcp stream connection.void open (UnixSocket &unixsock, int buffer=512)β open a tcp stream connection by accepting a tcp socket.void close (void)β close the active tcp stream connection. the door is shut. we are no longer taking calls. πbool operator! () constβ test to see if stream is open.
π Additional Inherited Members π
there's more where that came from, bestie β the inherited stuff lives over in the base class. iykyk.
π Detailed Description π
a more natural C++ unixstream class for use by non-threaded applications.
this class behaves a lot more like fstream and similar classes. lowkey that's the whole point. if you've ever used fstream and thought "why isn't this a unix socket," boom, here you go, you're welcome, no cap. π
Author
Alex Pavloff alex@pavloff.net
C++ 'fstream' style unixstream class. ate and left no crumbs. π₯
π§ Constructor & Destructor Documentation π§
πΈ ost::unixstream::unixstream ()
construct an unopened 'tcpstream' object. that's it. that's the whole vibe. it exists, it's empty, it's waiting for its moment. β
πΈ ost::unixstream::unixstream (const char * pathname, int buffer = 512)
construct and 'open' (connect) the tcp stream to a remote socket. one call, connected, done. highkey efficient of it.
Parameters
- pathname β pathname to socket file
- buffer β size for streaming (optional).
πΈ ost::unixstream::unixstream (UnixSocket & unixsock, int buffer = 512)
construct and 'accept' (connect) the tcp stream through a server. you're not the one knocking, you're the one answering. queen energy. π
Parameters
- unixsock β socket to accept from.
- buffer β size for streaming (optional).
π Member Function Documentation π
π void ost::unixstream::close (void)
close the active tcp stream connection. say bye. it's over. we're closing the chapter. π¦
π void ost::unixstream::open (const char * pathname, int buffer = 512)
[inline]
open a tcp stream connection. this will close the currently active connection first. so like, heads up bestie β it's not adding to your collection, it's replacing it. no hoarding allowed. π
Parameters
- pathname β pathname to socket file
- buffer β size for streaming (optional)
References ost::UnixStream::connect().
π void ost::unixstream::open (UnixSocket & unixsock, int buffer = 512)
open a tcp stream connection by accepting a tcp socket. server-side behavior, but make it a class method. β¨
Parameters
- unixsock β socket to accept from.
- buffer β size for streaming (optional)
π bool ost::unixstream::operator! () const
test to see if stream is open. the little ! that tells you the truth. vibe check for your connection. π
π Author π
Generated automatically by Doxygen for GNU CommonC++ from the source code. the robots wrote this part, not me. π€β¨
and that's the whole page, bestie! π«Ά this manual page is part of GNU CommonC++ and the version/date stamp on it is Sun Dec 27 2020. go forth and stream your unix sockets in style. bye bye! πππ
π¦ 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