diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2022-09-10 17:37:19 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2022-09-10 17:38:33 +0200 |
commit | 632ac992ab4a032a3415b99a419c0c88c22157e5 (patch) | |
tree | 3ded5c5a26320d1f460d64946150d77b44479478 /xC-proto | |
parent | d29e2cbfe82197319ab66ace6837bd3c1763dbad (diff) | |
download | xK-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-proto | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; |