summaryrefslogtreecommitdiff
path: root/libnetio/include
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-14 18:29:15 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-14 18:29:15 -0600
commit3dcbd43ecd77c28762b0595475893ff052c0444a (patch)
tree9823d647e98811bc33f19152217b0bfc72edb8ed /libnetio/include
parent1427269e8650964713505728eda84bfec1f685e1 (diff)
wip libnet rewrite
Diffstat (limited to 'libnetio/include')
-rw-r--r--libnetio/include/libnetio/netio.h27
1 files changed, 0 insertions, 27 deletions
diff --git a/libnetio/include/libnetio/netio.h b/libnetio/include/libnetio/netio.h
deleted file mode 100644
index 370d2ca..0000000
--- a/libnetio/include/libnetio/netio.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef _NETIO_H_
-#define _NETIO_H_
-
-#include <stdbool.h> /* for bool */
-#include <stdint.h> /* for uint16_t */
-#include <stddef.h> /* for size_t */
-#include <sys/types.h> /* for ssize_t */
-
-/** Return socket-fd on success, -errno on error. */
-int netio_listen(uint16_t port);
-/** Return connection-fd on success, -errno on error. */
-int netio_accept(int sock);
-/** Return bytes-read on success, 0 on EOF, -errno on error; a short read is *not* an error. */
-ssize_t netio_read(int conn, void *buf, size_t count);
-/**
- * Return `count` on success, -errno on error; a short write *is* an
- * error.
- *
- * Writes are *not* guaranteed to be atomic (as this would be
- * expensive to implement), so if you have concurrent writers then you
- * should arrange for a mutex to protect the connection.
- */
-ssize_t netio_write(int conn, void *buf, size_t count);
-/** Return 0 on success, -errno on error. */
-int netio_close(int conn, bool rd, bool wr);
-
-#endif /* _NETIO_H_ */