aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/net.h
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-08-30 13:38:05 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2022-08-30 13:50:17 +0200
commit40ce7bbfae7332b05eac7aa110241fc7b589fd70 (patch)
tree896a3c45f9da8e0115703434cfe4dffee476bdeb /src/net.h
parentnet: bind to IPv6 (diff)
downloadcimple-40ce7bbfae7332b05eac7aa110241fc7b589fd70.tar.gz
cimple-40ce7bbfae7332b05eac7aa110241fc7b589fd70.zip
net: more portable
Use a predefined byte order, integers with fixed width, etc.
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net.h b/src/net.h
index 125d4f3..5afe4b7 100644
--- a/src/net.h
+++ b/src/net.h
@@ -1,6 +1,7 @@
#ifndef __NET_H__
#define __NET_H__
+#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
@@ -9,10 +10,10 @@ 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 *, size_t);
+int net_send_buf(int fd, const void *, uint32_t);
ssize_t net_recv_all(int fd, void *, size_t);
-int net_recv_buf(int fd, void **, size_t *);
+int net_recv_buf(int fd, void **, uint32_t *);
int net_recv_static(int fd, void *, size_t);
#endif