summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2016-12-25 20:51:20 +0100
committertomsmeding <tom.smeding@gmail.com>2016-12-25 20:54:16 +0100
commit70431dcb67e33bd466d03fb41e5a90ba301127a4 (patch)
treed3d2d5373c5da4f27f431d3504b55c623e9b95e0 /util.h
parentef28fcb0f59d11bdf9f574a999045bc24ca40e18 (diff)
Make sendall* utils
Diffstat (limited to 'util.h')
-rw-r--r--util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/util.h b/util.h
index 1c99bea..5831b95 100644
--- a/util.h
+++ b/util.h
@@ -5,3 +5,7 @@ char* copy_buf(char *buf,int len);
char* copy_str(char *str);
void str_toupper(char *str);
+
+// Returns -1 on error, 0 on success
+int sendall(int sock,const char *buf,ssize_t len);
+int sendallf(int sock,const char *format,...) __attribute__((format (printf, 2, 3)));