1 #ifndef LIBNAGIOS_IOCACHE_H_INCLUDED
2 #define LIBNAGIOS_IOCACHE_H_INCLUDED
5 #include <sys/socket.h>
20 typedef struct iocache iocache;
51 extern int iocache_grow(iocache *ioc,
unsigned long increment);
97 extern char *
iocache_use_delim(iocache *ioc,
const char *delim,
size_t delim_len,
unsigned long *size);
133 extern int iocache_add(iocache *ioc,
char *buf,
unsigned int len);
147 extern int iocache_sendto(iocache *ioc,
int fd,
char *buf,
unsigned int len,
int flags,
const struct sockaddr *dest_addr, socklen_t addrlen);
161 static inline int iocache_send(iocache *ioc,
int fd,
char *buf,
unsigned int len,
int flags)
176 static inline int iocache_write(iocache *ioc,
int fd,
char *buf,
unsigned int len)
178 return iocache_send(ioc, fd, buf, len, 0);