#include <posix.h>
List of all members.
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 () |
Constructor & Destructor Documentation
wibble::stream::PosixBuf::PosixBuf |
( |
| ) |
|
|
inline |
wibble::stream::PosixBuf::PosixBuf |
( |
int |
fd, |
|
|
size_t |
bufsize = 4096 |
|
) |
| |
|
inline |
wibble::stream::PosixBuf::~PosixBuf |
( |
| ) |
|
|
inline |
Member Function Documentation
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.
References fd().
Referenced by PosixBuf().
int wibble::stream::PosixBuf::detach |
( |
| ) |
|
|
inline |
Sync the PosixBuf and detach it from the file descriptor.
PosixBuf will not touch the file descriptor anymore, and it is the responsibility of the caller to close it.
- Returns:
- The file descriptor
References sync().
int wibble::stream::PosixBuf::fd |
( |
| ) |
const |
|
inline |
Access the underlying file descriptor.
Referenced by attach().
int wibble::stream::PosixBuf::overflow |
( |
int |
c | ) |
|
|
inline |
int wibble::stream::PosixBuf::sync |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file: