Carl-Adam Brengesjö writes:
>> If you use context, use binary flags instead of string names - you can
>> save alot of bandwidth - instead of 18 bytes ("base,main,operator") you
>> have just 2 bytes (in a text protocol, 1 byte if we can cheat) (using
>> table described below).
>> base 0
>> identify 1
>> auth 2
>> main 4
>> operator 8
>> base|main|operator = 12
> ----- Eric's reply ------------------------------------
> Ok, you want to use numeric value instead of plain text name. I agree,
> it is
With all due respect, I don't, since if we use a bitfield number for
flags, we only get 32 (or possibly 64) possible contexts, which also
require a centralized place for registration. I was hoping on using
the text-based contexts for extending the protocol as well. For
example, if a specific client implementation has some extra command
that it wants to use, it could request an extra context named
"myextension" or similar from the hub/peer, and if the request is
successful, then those commands will be available.
So you see, I was also planning on having the context scheme double as
capability arbitration. Don't you think that's even slightly good?