aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/net.h b/src/net.h
index b6dd174..185f10b 100644
--- a/src/net.h
+++ b/src/net.h
@@ -16,9 +16,17 @@ int net_accept(int fd);
int net_connect(const char *host, const char *port);
int net_send_all(int fd, const void *, size_t);
-int net_send_buf(int fd, const void *, uint32_t);
-
int net_recv_all(int fd, void *, size_t);
-int net_recv_buf(int fd, void **, uint32_t *);
+
+struct buf;
+
+int buf_create(struct buf **, const void *, uint32_t);
+void buf_destroy(struct buf *);
+
+uint32_t buf_get_size(const struct buf *);
+void *buf_get_data(const struct buf *);
+
+int net_send_buf(int fd, const struct buf *);
+int net_recv_buf(int fd, struct buf **);
#endif