-Add SpiceMiniDataHeader.
-Introduce capability SPICE_COMMON_CAP_MINI_HEADER.
The advantage of using a header without sub list is to spare the 4 bytes that
were sent
for a lot of messages without sublist.
Instead, messages that previously contained sub lists, will be split to two
msgs.
The first one will be SPICE_MSG_LIST, holding the sub list, and the second will
be the
main msg.
When most of the messages do not contain sub lists, the overhead of the
additional 10 bytes
for the header of SPICE_MSG_LIST is negligible. In addition, if there is
only one message in the list, it can be sent independently.
Instead of sending the serial number of the messages, the client and
the server will increment local counters upon sending/receiving a
message.
---
spice/protocol.h | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/spice/protocol.h b/spice/protocol.h
index db8be89..cdefdc8 100644
--- a/spice/protocol.h
+++ b/spice/protocol.h
@@ -37,7 +37,7 @@
#define SPICE_MAGIC (*(uint32_t*)"REDQ")
#define SPICE_VERSION_MAJOR 2
-#define SPICE_VERSION_MINOR 1
+#define SPICE_VERSION_MINOR 2
// Encryption & Ticketing Parameters
#define SPICE_MAX_PASSWORD_LENGTH 60
@@ -58,6 +58,7 @@ enum {
SPICE_COMMON_CAP_PROTOCOL_AUTH_SELECTION,
SPICE_COMMON_CAP_AUTH_SPICE,
SPICE_COMMON_CAP_AUTH_SASL,
+ SPICE_COMMON_CAP_MINI_HEADER,
};
typedef struct SPICE_ATTR_PACKED SpiceLinkMess {
@@ -92,6 +93,11 @@ typedef struct SPICE_ATTR_PACKED SpiceDataHeader {
uint32_t sub_list; //offset to SpiceSubMessageList[]
} SpiceDataHeader;
+typedef struct SPICE_ATTR_PACKED SpiceMiniDataHeader {
+ uint16_t type;
+ uint32_t size;
+} SpiceMiniDataHeader;
+
typedef struct SPICE_ATTR_PACKED SpiceSubMessage {
uint16_t type;
uint32_t size;
--
1.7.6.4
_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel