-
Notifications
You must be signed in to change notification settings - Fork 1
docs: bring the spec to the spec repo #1
Conversation
Moved it to libp2p/mplex#1
|
||
``` | ||
header = readUvarint() | ||
flag = head & 0x07 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be header & 0x07
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review @richardschneider. This was a straight c&p from @Stebalien's notes. Mind submitting a PR with the proposed fixes?
``` | ||
header = readUvarint() | ||
flag = head & 0x07 | ||
id = flag >> 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should header >> 3
| CloseReceiver | 3 | | ||
| CloseInitiator | 4 | | ||
| ResetReceiver | 5 | | ||
| ResetInitiator | 6 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not displaying correctly. Try adding a header to the table, e.g. | Flag | Value| \n | ---- | ------ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed it in master. ca1d70a
|
||
The data segment is length prefixed by another unsigned varint. This results in one message looking like: | ||
|
||
| header | length | data | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again a header with | ---- | ---- | ---- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in master ca1d70a
//cc @Stebalien