ticc_fdstream - Implementation of iostreams tied to File Descriptors

NAME  DESCRIPTION  AUTHORS 

NAME

ticc_fdstream - Implementation of iostreams tied to File Descriptors

DESCRIPTION

Short description. Needs work...

The main functions are:

fdostream( int fd );

Open an ouput stream connected to the socket with the id: fd

fdistream( int fd );

Open an input stream connected to the socket with the id: fd

Both fdostream and fdistream can be used as normal ostream and istream streams for output/input respectively.

bool nb_getline( istream& stream, string& s, int& timeout );

bool nb_putline( ostream& stream, const string& s, int& timeout );

read/write a string s from/to a non-blocking stream stream using timeout to terminate the operation when it fails to complete within timeout

This only works for streams connected to a socket for which the operation mode is set to non_blocking, using fcntl( sock, F_SETFL, O_NONBLOCK ) or the like.

AUTHORS

Ko van der Sloot [email protected]


Updated 2024-01-29 - jenkler.se | uex.se