From 38418fcd2bb0d6ae159fecbb527bfa02ea9c9c3e Mon Sep 17 00:00:00 2001 From: Richard Nyberg Date: Sun, 5 Feb 2006 11:34:18 +0000 Subject: Add functions read_fully and write_fully. They are simpler alternatives to read and write on blocking sockets. --- misc/subr.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'misc/subr.h') diff --git a/misc/subr.h b/misc/subr.h index 8ad42c2..0a6223a 100644 --- a/misc/subr.h +++ b/misc/subr.h @@ -24,4 +24,7 @@ int canon_path(const char *path, char **res); long rand_between(long min, long max); +int read_fully(int fd, void *buf, size_t len); +int write_fully(int fd, const void *buf, size_t len); + #endif -- cgit 1.4.1