logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

FBB::Ifdstream - Input Stream initialized by a File Descriptor

Author

       Frank B. Brokken (f.b.brokken@rug.nl).

libbobcat-dev_6.07.01                               2005-2025                            FBB::IFdStream(3bobcat)

Bobcat

       Bobcat is an acronym of `Brokken’s Own Base Classes And Templates’.

Bobcat Project Files

       o      https://fbb-git.gitlab.io/bobcat/: gitlab project page;

       Debian Bobcat project files:

       o      libbobcat6: debian package containing the shared library, changelog and copyright note;

       o      libbobcat-dev:  debian package containing the static library, headers, manual pages, and developer
              info;

Bugs

       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.

Constructors

       o      IFdStream(intfd,size_tn=1):
              The constructor initializes the object to read from descriptor fd, using a buffer of  size  n,  by
              default having size 1.
              Use IFdStreamS(int fd, size_t n = 1) to construct an IFdStreamS object.

       Copy and move constructors (and assignment operators) are not available.

Description

FBB::IFdStream objects are used to extract information from devices whose file descriptors are available.

       FBB::IFdStreamS  objects  operate  like  FBB::IFdStream  objects  but  use FBB::Selector objects to check
       whether information on the object’s file descriptor is available before reading information from the file
       descriptor.

       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.

       Note that sockets can be used as file descriptors.

Example

       See the clientsocket(3bobcat) man-page for an example showing how to use IFdStream.

Files

bobcat/ifdstream - defines the FBB::IFdStream class interface
       bobcat/ifdstreams - defines the FBB::IFdStreamS class interface

Inherits From

std::istream

Member Functions

       All  members  of  std::istream are available, as FBB::IFdStream(S) inherits from this class. There are no
       additional members.

Name

       FBB::Ifdstream - Input Stream initialized by a File Descriptor

Namespace

FBB
       All  constructors,  members,  operators  and manipulators, mentioned in this man-page, are defined in the
       namespace FBB.

See Also

bobcat(7), ifdbuf(3bobcat), ofdstream(3bobcat), selector(3bobcat)

Synopsis

#include<bobcat/ifdstream> (when using FBB::IFdStream#include<bobcat/ifdstreams> (when using FBB::IFdStreamS

       Linking option: -lbobcat

See Also