summary refs log tree commit diff
path: root/bounce.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-10-28 19:21:44 -0400
committerJune McEnroe <june@causal.agency>2019-10-28 19:21:44 -0400
commit8b70aa21da96d9dcad641c3fe2787307d5610036 (patch)
treebf2e42559dcaf7fec495a0f47a4ff0470e0b7eb8 /bounce.h
parentUse "producer/consumer" consistently in ring code (diff)
downloadpounce-8b70aa21da96d9dcad641c3fe2787307d5610036.tar.gz
pounce-8b70aa21da96d9dcad641c3fe2787307d5610036.zip
Add option to save and load ring contents across restarts
Diffstat (limited to '')
-rw-r--r--bounce.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/bounce.h b/bounce.h
index 9221185..6e9ddbd 100644
--- a/bounce.h
+++ b/bounce.h
@@ -15,6 +15,7 @@
  */
 
 #include <stdbool.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
@@ -64,6 +65,8 @@ size_t ringDiff(size_t consumer);
 const char *ringPeek(time_t *time, size_t consumer);
 const char *ringConsume(time_t *time, size_t consumer);
 void ringInfo(void);
+int ringSave(FILE *file);
+void ringLoad(FILE *file);
 
 void listenConfig(const char *cert, const char *priv);
 size_t listenBind(int fds[], size_t cap, const char *host, const char *port);