1

クラスを作成するときの出力の最後の 2 バイト (ラップされたレコードの一部とそうでない部分) の意味は何ですか?

コマンド「CREATE CLASS Foo EXTENDS V」を発行しました。これは出力です(プロトコルの私の理解で注釈が付けられています):

Writing byte (1 byte): 0 [OChannelBinaryServer] # success
Writing int (4 bytes): 43 [OChannelBinaryServer] # session id 43
Writing byte (1 byte): 119 [OChannelBinaryServer] # w - this is a wrapped record
Writing short (2 bytes): 0 [OChannelBinaryServer] # this is a full record
Writing byte (1 byte): 100 [OChannelBinaryServer] # d - record is a document
Writing short (2 bytes): -1 [OChannelBinaryServer] # cluster id null
Writing long (8 bytes): -1 [OChannelBinaryServer] # cluster position null
Writing int (4 bytes): 0 [OChannelBinaryServer] # version 0
Writing bytes (4+16=20 bytes): [0, 0, 12, 114, 101, 115, 117, 108, 116, 0, 0, 0,
  15, 1, 0, 84] [OChannelBinaryServer] # the record, what is 84?
Writing byte (1 byte): 0 [OChannelBinaryServer] # what is this?

レコード自体が「result」という名前のフィールドにデコードされます。結果の値は整数で、42 にデコードされる varint 84 としてエンコードされます。その後、0 の後続バイトがあります。

結果の値 42 は何を意味しますか? 末尾の 0 は何を意味しますか?

私はプロトコル バージョン 36 を使用していることに注意してください。

ありがとう!

4

1 に答える 1