From 62bc1af6c6a1201db551e1ec523e757415464fd5 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 25 Oct 2020 13:26:29 +0000 Subject: tidy up, make less awful --- util.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 util.h (limited to 'util.h') diff --git a/util.h b/util.h new file mode 100644 index 0000000..9bee282 --- /dev/null +++ b/util.h @@ -0,0 +1,13 @@ +#ifndef _util_h_ +#define _util_h_ + +/* util.c */ +extern void set_nonblocking (int fd); +extern void set_blocking (int fd); +extern int fd_can_read (int fd); +extern int fd_drain (int fd); +extern int open_tty (const char *path, int baud); +extern int open_tcp_client (const char *host, unsigned port); +extern int open_tcp_server (unsigned port); + +#endif /* _util_h_ */ -- cgit v1.2.3