aboutsummaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-12-01 23:20:33 +0800
committerGuangxiong Lin <[email protected]>2022-12-01 23:20:33 +0800
commita9501d10847d7993fad2e0778fe9c11317b4f7be (patch)
tree470302a8a27b460c7f1fc5411e9f8dac0707743f /util.h
parent122a69f715acfe73963a2347cbb335e41bce944c (diff)
downloadtinyserver-a9501d10847d7993fad2e0778fe9c11317b4f7be.tar.gz
tinyserver-a9501d10847d7993fad2e0778fe9c11317b4f7be.tar.bz2
tinyserver-a9501d10847d7993fad2e0778fe9c11317b4f7be.zip
Simplify logic by structure
Diffstat (limited to 'util.h')
-rw-r--r--util.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/util.h b/util.h
new file mode 100644
index 0000000..6e9c8cf
--- /dev/null
+++ b/util.h
@@ -0,0 +1,10 @@
+#ifndef __UTIL_H
+#define __UTIL_H
+
+#define ERROR -1
+#define OK 0
+
+void panic(const char *);
+int setblocking(int fd, bool blocking);
+
+#endif