-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add contracts for parser functions #12
Conversation
lib/parser.js
Outdated
// Read parcel from buffer | ||
// Return parcel object | ||
const rest = Buffer.from(buffer, 1, PARCEL_LENGTH); | ||
return rest; | ||
}; | ||
|
||
const chunk = (buffer) => { | ||
const parcel = ( | ||
// Encode handshake structure to Buffer |
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.
Encode parcel structure
скорее
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
@@ -1,41 +1,86 @@ | |||
'use strict'; | |||
|
|||
const PROTOCOL_VERSION = 1; |
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.
In issue #3 2b for protocol version declared
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.
We will use writeInt16LE
to write this Number
value to 2 bytes binary field @mille-nium
Landed in 4d26244 |
No description provided.