diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-04-28 12:58:42 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-04-29 09:57:16 +0200 |
commit | 37895358b03b805f1887749c8dc73d1e075af810 (patch) | |
tree | e1cc37f8f6ea6dc2b5de229a8f80dc5052fd25af /src/tcp_server.h | |
parent | docker-compose.yml: exit from client painlessly (diff) | |
download | cimple-37895358b03b805f1887749c8dc73d1e075af810.tar.gz cimple-37895358b03b805f1887749c8dc73d1e075af810.zip |
make struct tcp_server opaque
Diffstat (limited to 'src/tcp_server.h')
-rw-r--r-- | src/tcp_server.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/tcp_server.h b/src/tcp_server.h index 55fb1fa..0f377d8 100644 --- a/src/tcp_server.h +++ b/src/tcp_server.h @@ -8,12 +8,10 @@ #ifndef __TCP_SERVER_H__ #define __TCP_SERVER_H__ -struct tcp_server { - int fd; -}; +struct tcp_server; -int tcp_server_create(struct tcp_server *, const char *port); -void tcp_server_destroy(const struct tcp_server *); +int tcp_server_create(struct tcp_server **, const char *port); +void tcp_server_destroy(struct tcp_server *); typedef int (*tcp_server_conn_handler)(int conn_fd, void *arg); int tcp_server_accept(const struct tcp_server *, tcp_server_conn_handler, void *arg); |