FBB::IFdStream(3bobcat)
π FBB::IFdStream β File Descriptor Input Stream π
ok so bestie, you know how file descriptors are likeβ¦ the raw, unhinged, no-C++-wrapper version of "here's a thing you can read from"? This is that, but as an actual C++ input stream. It's giving β¨glow-upβ¨ and honestly we're obsessed. The manual calls it FBB::IFdStream(3bobcat) btw, that's the whole vibe.
β¨ NAME β¨
FBB::Ifdstream β Input Stream initialized by a File Descriptor
(yeah it's spelled with a little d in there, we don't question the naming choices of the past, we simply respect them π«Ά)
πΈ SYNOPSIS πΈ
#include <bobcat/ifdstream> (when using FBB::IFdStream
#include <bobcat/ifdstreams> (when using FBB::IFdStreamS
Linking option: -lbobcat
lowkey notice the headers are two different files depending on which class you're being, and also bestie, those parens in the original are unclosed. not me fixing them. π the manpage said it like that, so that's how it stays.
π¦ DESCRIPTION π¦
FBB::IFdStream objects are your go-to when you wanna extract information from devices whose file descriptors are available. like, the device gives you a file descriptor and you're like "cool, I want >> and getline on that" and boom, this class steps in.
FBB::IFdStreamS objects are the same energy as FBB::IFdStream objects, but they use FBB::Selector objects to do a lil vibe check first β they check whether information on the object's file descriptor is actually available before reading information from the file descriptor. so it's the "are you sure you're ready to talk to me" version. π
ok important: file descriptors are not defined within the context of C++, but they can be used on operating systems that support the concept. Realize that using file descriptors introduces operating system dependencies β so like, this is portable-ish, not portable-portable. βοΈ it's giving "works where it works".
also note: sockets can be used as file descriptors. yes really. sockets are just file descriptors wearing a cute outfit. π₯
π NAMESPACE π
FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB. periodt.
π INHERITS FROM π
std::istream
(yes, it's that istream. the one you already know. she's in the family. π)
π CONSTRUCTORS π
IFdStream(int fd, size_t n = 1)β the constructor initializes the object to read from descriptorfd, using a buffer of sizen, by default having size1. UseIFdStreamS(int fd, size_t n = 1)to construct anIFdStreamSobject. β¨
Copy and move constructors (and assignment operators) are not available. so like, don't try to copy her, she does not do that. not available, not happening, not the vibe. π
π MEMBER FUNCTIONS π
All members of std::istream are available, as FBB::IFdStream(S) inherits from this class. There are no additional members.
that's it. that's the whole list. she brought nothing extra to the group chat, she's just here to be an istream. and honestly? iconic. π«Ά
β EXAMPLE β
See the clientsocket(3bobcat) man-page for an example showing how to use IFdStream. go read that one bestie, that's where the demo lives. π
π FILES π
bobcat/ifdstreamβ defines theFBB::IFdStreamclass interfacebobcat/ifdstreamsβ defines theFBB::IFdStreamSclass interface
π₯ SEE ALSO π₯
bobcat(7), ifdbuf(3bobcat), ofdstream(3bobcat), selector(3bobcat)
iykyk. go read the friends, they explain the lore. π
π BUGS π
ok so this is the part where you sit down and listen.
The IFdStream(S) object uses an IFdBuf(S) for its std::streambuf. This buffer is associated with the file descriptor passed to IFdStream(S)'s constructor. When the IFdStream(S) object goes out of scope, the device (file, socket, etc.) to which the file descriptor that was passed to IFdStream(S)'s constructor is not closed.
like. the stream leaves. the fd stays open. it does not clean up after itself. that's not a bug in your code, that's just how this works, but you need to KNOW it, fr fr. close your own descriptors. π
π§ BOBCAT PROJECT FILES π§
https://fbb-git.gitlab.io/bobcat/: gitlab project page;
Debian Bobcat project files:
libbobcat6: debian package containing the shared library, changelog and copyright note;libbobcat-dev: debian package containing the static library, headers, manual pages, and developer info;
πΈ BOBCAT πΈ
Bobcat is an acronym of Brokkenβs Own Base Classes And Templates.
π COPYRIGHT π
This is free software, distributed under the terms of the GNU General Public License (GPL). π
π AUTHOR π
Frank B. Brokken (f.b.brokken@rug.nl).
and that's the whole page bestie, you ate it, no crumbs, no cap. this lil angel shipped as part of libbobcat-dev version 6.15.01, dated 2005-2026 β yes the range is long, she's been serving for TWO DECADES, main character energy fr. π
β¨π¦π
FBB::IFdStream(3bobcat) β signing off, stay hydrated, close your file descriptors. π«ΆπΈ
π¦ where this page comes from
- ubuntu stonking: libbobcat-dev 6.15.01-1 Β· GPL-3.0-or-later WITH OpenSSL exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms