libzypp
17.25.8
|
Classes | |
class | TimeoutException |
Typedefs | |
using | timeout_type = size_t |
Enumerations | |
enum | BlockingMode { BlockingMode::FailedToSetMode = -1, BlockingMode::WasBlocking, BlockingMode::WasNonBlocking } |
enum | ReceiveUpToResult { Success, Timeout, EndOfFile, Error } |
Functions | |
BlockingMode | setFILEBlocking (FILE *file, bool mode=true) |
Enables or disabled non blocking mode on a file descriptor. More... | |
std::pair< ReceiveUpToResult, std::string > | receiveUpto (FILE *file, char c, timeout_type timeout, bool failOnUnblockError) |
Variables | |
static const timeout_type | no_timeout = static_cast<timeout_type>(-1) |
using zypp::io::timeout_type = typedef size_t |
|
strong |
BlockingMode zypp::io::setFILEBlocking | ( | FILE * | file, |
bool | mode = true |
||
) |
Enables or disabled non blocking mode on a file descriptor.
The return value is one of the zypp::io::BlockingMode values
Definition at line 24 of file IOTools.cc.
std::pair< ReceiveUpToResult, std::string > zypp::io::receiveUpto | ( | FILE * | file, |
char | c, | ||
timeout_type | timeout, | ||
bool | failOnUnblockError = true |
||
) |
Reads data from file until it finds a seperator c, hits the end of the file or times out. The timeout value is specified in milliseconds, a timeout of -1 means no timeout. If failOnUnblockError is set to false the function will not error out if unblocking the file descriptor did not work. The default is to fail if it's not possible to unblock the file.
Definition at line 52 of file IOTools.cc.
|
static |