rpcstream(3I)

πŸ’– rpcstream β€” bestie edition πŸ’–

okay so this is rpcstream(3I) from the InterViews Reference Manual, and honestly? it's giving "streams but make it RPC." let's get into it 🫢


✨ NAME ✨

rpcstream β€” an iostreamb that's been specialized to RPC requests. that's it, that's the girl πŸ’…


🌸 SYNOPSIS 🌸

#include <Dispatch/rpcstream.h>

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, rpcstream, irpcstream, and orpcstream are the glow-ups of iostream, istream, and ostream respectively, but for RPC requests. meaning: the streambuf hanging out with them is gonna be an rpcbuf. no cap.

and here's the tea πŸ“ β€” conversions are formatted (aka ASCII), so your datums need to be separated by space characters. don't forget or it's over for you bestie 😭


πŸŽ€ CONSTRUCTORS πŸŽ€

  • rpcstream() β€” constructs an unopened rpcstream. just a lil baby stream, not connected to anything yet. iconic.

πŸ‘‘ PUBLIC OPERATIONS πŸ‘‘

  • void listen(int port)
  • void connect(const char* host, int port) β€” create a connection. any failure sets ios::failbit in the error state. so if it doesn't work, it tells you. periodt.
  • int accept() β€” accept a pending connection and return the new file descriptor. lowkey the moment we've all been waiting for ✨
  • void attach(int fd) β€” attach to a pre-existing connection. like adopting a connection that's already been through it πŸ™ˆ
  • void close() β€” break a connection. the error state gets cleared except on failure. so basically: clean exit, clean vibes; fail, and the error state stays mad at you πŸ’€
  • void nonblocking(boolean)
  • void verbose(boolean) β€” enable or disable non-blocking I/O and/or printing of error messages. your choice bestie, toggle away 🎚️
  • rpcbuf* rdbuf() β€” return a pointer to the rpcbuf that the rpcstream created. here's ur buf, bestie 🫴
  • boolean incomplete_request()
  • void incomplete_request(boolean) β€” get or set a flag. it's used by the operations that insert an RpcHdr into an rpcstream or extract an RpcHdr from an rpcstream. so yeah, the header-inserting/extracting girlies rely on this one 🧚

🌈 SEE ALSO 🌈

  • IOS.INTRO(3C++)
  • iostreamb(3I)
  • rpcbuf(3I)

go read those too, fr fr. iykyk πŸ“š


and that's a wrap on the rpcstream(3I) page from the InterViews Reference Manual, dated 27 March 1991 πŸ’œ slay, bye bestie πŸ‘‘πŸ’…βœ¨