summaryrefslogtreecommitdiffstats
path: root/src/lib/iostream.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/iostream.h')
-rw-r--r--src/lib/iostream.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/iostream.h b/src/lib/iostream.h
new file mode 100644
index 0000000..87bc374
--- /dev/null
+++ b/src/lib/iostream.h
@@ -0,0 +1,10 @@
+#ifndef IOSTREAM_H
+#define IOSTREAM_H
+
+/* Returns human-readable reason for why iostream was disconnected.
+ The output is either "Connection closed" for clean disconnections or
+ "Connection closed: <error>" for unclean disconnections. */
+const char *io_stream_get_disconnect_reason(struct istream *input,
+ struct ostream *output);
+
+#endif