00001 /************************************************************************ 00002 * File: recvline.h 00003 * Purpose: Provides a header file for the recvn function from 00004 * the book Advanced Programming in the UNIX Environment by Richard Stevens. 00005 * The writen function calls the recv function repeatedly until n bytes 00006 * have been recv from the file descriptor. 00007 *************************************************************************/ 00008 00009 #ifndef RECVLINE_H 00010 #define RECVLINE_H 00011 00012 00013 #ifdef __cplusplus 00014 extern "C" 00015 { 00016 #endif 00017 00018 int recvline (int fd, char *cptr, int max, int flags, double timeout, 00019 int *bytes_read); 00020 void clean_prev_read_info (int fd); 00021 int get_bytes_already_read (int fd); 00022 extern int recvline_timedout; 00023 00024 #ifdef __cplusplus 00025 }; 00026 #endif 00027 00028 00029 #endif /* RECVLINE_H */