aboutsummaryrefslogtreecommitdiff
path: root/xC-proto
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-09-10 17:37:19 +0200
committerPřemysl Eric Janouch <p@janouch.name>2022-09-10 17:38:33 +0200
commit632ac992ab4a032a3415b99a419c0c88c22157e5 (patch)
tree3ded5c5a26320d1f460d64946150d77b44479478 /xC-proto
parentd29e2cbfe82197319ab66ace6837bd3c1763dbad (diff)
downloadxK-632ac992ab4a032a3415b99a419c0c88c22157e5.tar.gz
xK-632ac992ab4a032a3415b99a419c0c88c22157e5.tar.xz
xK-632ac992ab4a032a3415b99a419c0c88c22157e5.zip
xC/xP: only send buffer stats in the initial sync
The client and frontends track these separately, there is no need for hard synchronization.
Diffstat (limited to 'xC-proto')
-rw-r--r--xC-proto6
1 files changed, 4 insertions, 2 deletions
diff --git a/xC-proto b/xC-proto
index fd06491..7b77e5d 100644
--- a/xC-proto
+++ b/xC-proto
@@ -19,7 +19,7 @@ struct CommandMessage {
case HELLO:
u32 version;
// If the version check succeeds, the client will receive
- // an initial stream of BUFFER_UPDATE, BUFFER_LINE,
+ // an initial stream of BUFFER_UPDATE, BUFFER_STATS, BUFFER_LINE,
// and finally a BUFFER_ACTIVATE message.
case ACTIVE:
void;
@@ -50,6 +50,7 @@ struct EventMessage {
union EventData switch (enum Event {
PING,
BUFFER_UPDATE,
+ BUFFER_STATS,
BUFFER_RENAME,
BUFFER_REMOVE,
BUFFER_ACTIVATE,
@@ -62,12 +63,13 @@ struct EventMessage {
void;
case BUFFER_UPDATE:
string buffer_name;
+ case BUFFER_STATS:
+ string buffer_name;
// These are cumulative, even for lines flushed out from buffers.
// Updates to these values aren't broadcasted, thus handle:
// - BUFFER_LINE by bumping/setting them as appropriate,
// - BUFFER_ACTIVATE by clearing them for the previous buffer
// (this way, they can be used to mark unread messages).
- // Any updates received after the initial sync should be ignored.
u32 new_messages;
u32 new_unimportant_messages;
bool highlighted;