LIB-ZC, 一个跨平台(Linux)平台通用C/C++扩展库, IO操作
- 本封装主要目的是跨平台
- 命名空间 zcc
- 返回 -1 表示出错
函数列表
int timed_read_write_wait_millisecond(int fd, int read_wait_timeout, int *readable, int *writeable);
int timed_read_write_wait(int fd, int read_wait_timeout, int *readable, int *writeable);
int timed_read_wait_millisecond(int fd, int wait_timeout);
int timed_read_wait(int fd, int wait_timeout);
int timed_read(int fd, void *buf, int size, int wait_timeout);
int timed_write_wait_millisecond(int fd, int wait_timeout);
int timed_write_wait(int fd, int wait_timeout);
int timed_write(int fd, const void *buf, int size, int wait_timeout);
int rwable(int fd);
int readable(int fd);
int writeable(int fd);
int nonblocking(int fd, bool tf = true);
#ifdef _WIN64
int close(HANDLE fd);
#else
int close(int fd);
#endif
int close_on_exec(int fd, bool tf = true);
int get_readable_count(int fd);
#ifdef __linux__
int recv_fd(int fd);
int send_fd(int fd, int sendfd);
#endif