From e863b94b1aac01140c543ba8b8666de9cb42715c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 15 Sep 2020 14:20:35 +0200 Subject: [PATCH] daemon/io: don't expose io_stream_* types We don't need them anywhere, so let's keep their scope small. --- daemon/io.c | 13 +++++++++++++ daemon/io.h | 13 +------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/daemon/io.c b/daemon/io.c index a1af8709e..c9c2f3437 100644 --- a/daemon/io.c +++ b/daemon/io.c @@ -436,6 +436,19 @@ int io_listen_tcp(uv_loop_t *loop, uv_tcp_t *handle, int fd, int tcp_backlog, bo return 0; } + +enum io_stream_mode { + io_mode_text = 0, + io_mode_binary = 1, +}; + +struct io_stream_data { + enum io_stream_mode mode; + size_t blen; + char *buf; + knot_mm_t *pool; +}; + /** * TTY control: process input and free() the buffer. * diff --git a/daemon/io.h b/daemon/io.h index 2dac70f2d..eefde8097 100644 --- a/daemon/io.h +++ b/daemon/io.h @@ -14,18 +14,7 @@ struct tls_ctx; struct tls_client_ctx; - -enum io_stream_mode { - io_mode_text = 0, - io_mode_binary = 1, -}; - -struct io_stream_data { - enum io_stream_mode mode; - size_t blen; - char *buf; - knot_mm_t *pool; -}; +struct io_stream_data; /** Bind address into a file-descriptor (only, no libuv). type is e.g. SOCK_DGRAM */ int io_bind(const struct sockaddr *addr, int type, const endpoint_flags_t *flags); -- 2.47.3