From 3dcbd43ecd77c28762b0595475893ff052c0444a Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Mon, 14 Oct 2024 18:29:15 -0600 Subject: wip libnet rewrite --- libnetio/include/libnetio/netio.h | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 libnetio/include/libnetio/netio.h (limited to 'libnetio/include') 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 /* for bool */ -#include /* for uint16_t */ -#include /* for size_t */ -#include /* 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_ */ -- cgit v1.2.3-2-g168b