summary refs log tree commit diff
path: root/bounce.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-10-25 03:04:45 -0400
committerJune McEnroe <june@causal.agency>2019-10-25 03:04:45 -0400
commit243a5f930dce0cddd54d7d927774f7ad82b3d88e (patch)
treef2730a84c336ac408af4fc2a9da795daf6c5234b /bounce.h
parentImplement client reading from ring buffer (diff)
downloadpounce-243a5f930dce0cddd54d7d927774f7ad82b3d88e.tar.gz
pounce-243a5f930dce0cddd54d7d927774f7ad82b3d88e.zip
Use produce/consume words for ring buffer
To disambiguate clientRecv and clientRead, say clientConsume.
Diffstat (limited to '')
-rw-r--r--bounce.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/bounce.h b/bounce.h
index d4ec916..3c95f70 100644
--- a/bounce.h
+++ b/bounce.h
@@ -53,10 +53,10 @@ static inline struct Message parse(char *line) {
 	return msg;
 }
 
-void ringWrite(const char *line);
-size_t ringReader(const char *name);
-size_t ringDiff(size_t reader);
-const char *ringRead(time_t *time, size_t reader);
+void ringProduce(const char *line);
+size_t ringConsumer(const char *name);
+size_t ringDiff(size_t consumer);
+const char *ringConsume(time_t *time, size_t consumer);
 
 void listenConfig(const char *cert, const char *priv);
 size_t listenBind(int fds[], size_t cap, const char *host, const char *port);
@@ -82,7 +82,7 @@ void clientSend(struct Client *client, const char *ptr, size_t len);
 void clientFormat(struct Client *client, const char *format, ...)
 	__attribute__((format(printf, 2, 3)));
 size_t clientDiff(const struct Client *client);
-void clientRead(struct Client *client);
+void clientConsume(struct Client *client);
 
 bool stateReady(void);
 void stateParse(char *line);