summaryrefslogtreecommitdiff
path: root/netio.h
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-09-22 00:56:20 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-09-22 00:56:20 -0600
commit8ae41297e21c96793ab1f2c8d1abcc5f274501e2 (patch)
treec2d8a94ed875c3739a2f730a2ea16dd802948615 /netio.h
parentb13be233849bfec6277638f6bf7261a4b709cedf (diff)
wip netio
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_ */