#include <posix.h>
Public Member Functions | |
PosixBuf () | |
PosixBuf (int fd, size_t bufsize=4096) | |
~PosixBuf () | |
void | attach (int fd, size_t bufsize=4096) |
Attach the stream to a file descriptor, using the given stream size. | |
int | detach () |
Sync the PosixBuf and detach it from the file descriptor. | |
int | fd () const |
Access the underlying file descriptor. | |
int | overflow (int c) |
int | sync () |
wibble::stream::PosixBuf::PosixBuf | ( | ) | [inline] |
wibble::stream::PosixBuf::PosixBuf | ( | int | fd, | |
size_t | bufsize = 4096 | |||
) | [inline] |
References attach().
wibble::stream::PosixBuf::~PosixBuf | ( | ) | [inline] |
References sync().
void wibble::stream::PosixBuf::attach | ( | int | fd, | |
size_t | bufsize = 4096 | |||
) | [inline] |
Attach the stream to a file descriptor, using the given stream size.
Management of the file descriptor will be taken over by the PosixBuf, and the file descriptor will be closed with PosixBuf goes out of scope.
Referenced by PosixBuf().
int wibble::stream::PosixBuf::detach | ( | ) | [inline] |
int wibble::stream::PosixBuf::fd | ( | ) | const [inline] |
Access the underlying file descriptor.
int wibble::stream::PosixBuf::overflow | ( | int | c | ) | [inline] |
References sync().
int wibble::stream::PosixBuf::sync | ( | ) | [inline] |
Referenced by detach(), overflow(), and ~PosixBuf().