diff options
author | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2024-06-19 15:29:19 +0200 |
---|---|---|
committer | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2024-06-19 15:29:19 +0200 |
commit | ead2881be92d33076c2104dbd75bad3561f26088 (patch) | |
tree | 75ed0217a40a1321ce22ca7b675f4d148ce29161 /include/peer.h | |
parent | f19e329254d89ddf6d946410b56975a5c550c3f4 (diff) |
server: implement auth and sending nodes
Diffstat (limited to 'include/peer.h')
-rw-r--r-- | include/peer.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/peer.h b/include/peer.h index 63de9e5..f6baa4b 100644 --- a/include/peer.h +++ b/include/peer.h @@ -8,6 +8,7 @@ #include <stdint.h> #include <stdbool.h> #include <stddef.h> +#include <poll.h> #define PEER_INBUFFER_SIZE 0x100000 // 1MB #define PEER_OUTBUFFER_SIZE 0x200000 // 2MB @@ -33,8 +34,8 @@ typedef struct { void peer_init(peer *p, int socket); void peer_free(peer *p); -short peer_prepare(peer *p); -bool peer_ready(peer *p, short revents); -bool peer_send(peer *p, uint8_t *data, size_t len); +struct pollfd peer_prepare(peer *p); +bool peer_ready(peer *p, struct pollfd revents); +bool peer_send(peer *p, void *data, size_t len); #endif |