summaryrefslogtreecommitdiff
path: root/netio.h
diff options
context:
space:
mode:
Diffstat (limited to 'netio.h')
-rw-r--r--netio.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/netio.h b/netio.h
new file mode 100644
index 0000000..cb2e603
--- /dev/null
+++ b/netio.h
@@ -0,0 +1,14 @@
+#ifndef _NETIO_H_
+#define _NETIO_H_
+
+#include <stdint.h>
+#include <stdbool.h>
+
+void netio_init(void);
+
+int netio_accept(int sock);
+int netio_read(int conn, void *buf, size_t count);
+int netio_write(int conn, void *buf, size_t count);
+int netio_close(int conn, bool rd, bool wr);
+
+#endef /* _NETIO_H_ */