-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
block2 request #27
block2 request #27
Conversation
Super cool! However, could you please add unit tests? I can't merge it without them, otherwise I might broke things :/ |
num = (block2Value[0]*256*256 + block2Value[1]*256 + block2Value[2]) >>4 | ||
break | ||
default: | ||
throw new Error('Too long block2 option size: '+block2Value.length) |
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.
please, do no throw, but emit an error instead.
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.
yes, will update
Woow! This is so much work! Thank you very much! I see a failing test on Travis, can you please check? |
My local testing success, but travis one fail. I'm investigating! |
Could you please accept my pull request for coap packet. This is a simple commit which declares block1 and block2 options. After updating this coap-packet, the travis test will be passed. For this pull request, some stuffs are added:
Todo:
|
"lru-cache": "~2.5.0" | ||
"coap-packet": "~0.1.8", | ||
"lru-cache": "~2.5.0", | ||
"underscore": "^1.6.0" |
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.
Is underscore still needed?
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.
Oh, I forgot to delete it!
catch (e) { | ||
req.sender.reset() | ||
return req.emit('error', err) | ||
} |
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.
Do not try catch, see explanation down there.
Great, with the new coap-packet the Travis build passes! |
Anyway, do you want to help maintaining/developing this library according to https://github.com/mcollina/node-coap/blob/master/CONTRIBUTING.md? |
Yes, with all my pleasure for my first "contributing" to open source. |
Feel free to add yourself to the README :). |
Can you please add an example of a Blockwise request and server in the examples/ folder? |
Blockwise examples will be added soon! On Thứ ba, 17 Tháng sáu Năm 2014 23:42:11 ICT, Matteo Collina wrote:
|
coap.js now can request for a resource that return in blockwise(2).
Tested with coap.request('coap://coap.me/.well-known/core').
Todo