ost::unixstream(3)

πŸ“¦ version 1.8.1, in ubuntu jammy

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