2
* UX IO functions header file
3
* Copyright (C) 2006-2009 Unix Solutions Ltd.
5
* Released under MIT license.
6
* See LICENSE-MIT.txt for license terms.
16
#include <sys/socket.h>
17
#include <sys/types.h>
19
char * chomp(char *x);
21
ssize_t safe_read(int fd, void *buf, size_t len);
22
ssize_t safe_write(int fd, const void *buf, size_t len);
23
void shutdown_fd(int *in_fd);
25
ssize_t fdgetline(int fd, char *buf, size_t buf_size);
26
ssize_t fdread_ex(int fd, char *buf, size_t buf_size, int timeout, int retries, int waitfull);
27
ssize_t fdread(int fd, char *buf, size_t buf_size);
28
ssize_t fdread_nowaitfull(int fd, char *buf, size_t buf_size);
29
ssize_t fdwrite(int fd, char *buf, size_t buf_size);
31
int fdputs(int fd, char *msg);
32
int fdputsf(int fd, char *fmt, ...);
34
void set_log_io_errors(int report_io_errors);
36
void set_sock_nonblock(int sockfd);
37
void set_sock_block(int sockfd);
39
int do_connect(int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen, int timeout);