aboutsummaryrefslogtreecommitdiff
path: root/io.h
diff options
context:
space:
mode:
Diffstat (limited to 'io.h')
-rw-r--r--io.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/io.h b/io.h
new file mode 100644
index 0000000..cee8dda
--- /dev/null
+++ b/io.h
@@ -0,0 +1,9 @@
+#pragma once
+
+#include <stdio.h>
+
+int read_all(int fd, unsigned char *buf, size_t count);
+int read_some(int fd, unsigned char *buf, size_t *lenp);
+int write_all(int fd, unsigned const char *buf, size_t count);
+ssize_t read_file(char *buf, size_t len, const char *fmt, ...);
+int tcp_connect(const char *host, const char *port, char const **err);