1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
includefile(include/header)
COMMENT(manpage, section, releasedate, archive, short name)
manpage(FBB::IFdStream)(3bobcat)(_CurYrs_)(libbobcat-dev__CurVers_)
(File Descriptor Input Stream)
manpagename(FBB::Ifdstream)(Input Stream initialized by a File Descriptor)
manpagesynopsis()
bf(#include <bobcat/ifdstream>)nl()
manpagedescription()
bf(FBB::IFdStream) objects may be used to extract information from a
device whose file descriptor is available.
File descriptors are not defined within the context of bf(C++),
but they can be used on operating systems that support the concept. Realize
that using file descriptors introduces operating system dependencies.
Note that em(sockets) can be used as file descriptors.
includefile(include/namespace)
manpagesection(INHERITS FROM)
bf(std::istream)
manpagesection(CONSTRUCTORS)
itemization(
itb(IFdStream(int fd, size_t n = 1))
The constructor initializes the object to read from descriptor tt(fd),
using a buffer of size tt(n), by default having size 1.
)
Copy and move constructors (and assignment operators) are not available.
manpagesection(MEMBER FUNCTIONS)
All members of bf(std::istream) are available, as bf(FBB::IFdStream)
inherits from this class. There are no additional members.
manpagesection(EXAMPLE)
See the bf(clientsocket)(3bobcat) man-page for an example showing how to
use tt(IFdStream).
manpagefiles()
em(bobcat/ifdstream) - defines the class interface
manpageseealso()
bf(bobcat)(7), bf(ifdbuf)(3bobcat), bf(ofdstream)(3bobcat)
manpagebugs()
The tt(IFdStream) object uses a tt(IFdStreamBuf) for its
tt(std::streambuf). This buffer is associated with the file descriptor passed
to tt(IFdStream)'s constructor. When the tt(IFdStream) object goes out of
scope the device (file, socket, etc.) to which the file descriptor that was
passed to tt(IFdStream)'s constructor is em(not) closed.
includefile(include/trailer)
|