#include <posix.h>
◆ PosixBuf() [1/2]
wibble::stream::PosixBuf::PosixBuf |
( |
| ) |
|
|
inline |
◆ PosixBuf() [2/2]
wibble::stream::PosixBuf::PosixBuf |
( |
int |
fd, |
|
|
size_t |
bufsize = 4096 |
|
) |
| |
|
inline |
◆ ~PosixBuf()
wibble::stream::PosixBuf::~PosixBuf |
( |
| ) |
|
|
inline |
◆ attach()
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().
◆ detach()
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().
◆ fd()
int wibble::stream::PosixBuf::fd |
( |
| ) |
const |
|
inline |
Access the underlying file descriptor.
Referenced by attach().
◆ overflow()
int wibble::stream::PosixBuf::overflow |
( |
int |
c | ) |
|
|
inline |
◆ sync()
int wibble::stream::PosixBuf::sync |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file: