Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/wireprotoframing.py @ 37299:e9aadee698cf
wireproto: add frame flag to denote payloads as CBOR
We may eventually want a separate frame type for this. But for
now this is the easiest to implement.
Differential Revision: https://phab.mercurial-scm.org/D2986
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 28 Mar 2018 13:30:24 -0700 |
parents | 5ef2da00e935 |
children | 36d17f37db91 |
comparison
equal
deleted
inserted
replaced
37298:5ef2da00e935 | 37299:e9aadee698cf |
---|---|
77 b'eos': FLAG_COMMAND_DATA_EOS, | 77 b'eos': FLAG_COMMAND_DATA_EOS, |
78 } | 78 } |
79 | 79 |
80 FLAG_BYTES_RESPONSE_CONTINUATION = 0x01 | 80 FLAG_BYTES_RESPONSE_CONTINUATION = 0x01 |
81 FLAG_BYTES_RESPONSE_EOS = 0x02 | 81 FLAG_BYTES_RESPONSE_EOS = 0x02 |
82 FLAG_BYTES_RESPONSE_CBOR = 0x04 | |
82 | 83 |
83 FLAGS_BYTES_RESPONSE = { | 84 FLAGS_BYTES_RESPONSE = { |
84 b'continuation': FLAG_BYTES_RESPONSE_CONTINUATION, | 85 b'continuation': FLAG_BYTES_RESPONSE_CONTINUATION, |
85 b'eos': FLAG_BYTES_RESPONSE_EOS, | 86 b'eos': FLAG_BYTES_RESPONSE_EOS, |
87 b'cbor': FLAG_BYTES_RESPONSE_CBOR, | |
86 } | 88 } |
87 | 89 |
88 FLAG_ERROR_RESPONSE_PROTOCOL = 0x01 | 90 FLAG_ERROR_RESPONSE_PROTOCOL = 0x01 |
89 FLAG_ERROR_RESPONSE_APPLICATION = 0x02 | 91 FLAG_ERROR_RESPONSE_APPLICATION = 0x02 |
90 | 92 |