-
Notifications
You must be signed in to change notification settings - Fork 97
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
Feature/add ssl tls support #43
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Owner
Trakkasure
commented
Aug 21, 2017
- Breaking change: The connect and login phases have been separated to allow finer grained control.
- Added SSL/TLS support.
- Added ipv6 support.
- Fixed missing event emitters for trap,done, and close of Channel and Connection objects.
Update Readme.md
The basic logic is the same but there are LOTS of structural changes so this version is NOT ABI compatable with the previous versions. * Changed the entry point to require('mikronode').getConnection() * Moved closeOn* methods to properties. * Refactored methods to prototype. * Hid most internal properties using the 'private-parts' package. * Added Promises for connection and channel. * Changed debugging output to use the 'debug' package. * Added lots of JSDocs. * Updated the examples to show Promise usage.
Updated readme Updated JSDocs
Added test Added promise example file Refactored login Refactored Sentence
Added test Added promise example file Refactored login Refactored Sentence
The basic logic is the same but there are LOTS of structural changes so this version is NOT ABI compatable with the previous versions. * Fixed bugs * Changed the entry point to require('mikronode').getConnection() * Moved closeOn* methods to properties. * Refactored methods to prototype. * Hid most internal properties using the 'private-parts' package. * Added Promises for connection and channel. * Changed debugging output to use the 'debug' package. * Added lots of JSDocs. * Added tests * Updated the examples to show Promise usage.
The channel timeout listener was running in the connection's context instead of the channel's and was causing a stack overflow when it called emit('timeout').
The Connection options parameter now takes a 'tls' property that when set to true or a tls.TLSSocket options object, will connect to the device using TLS. The default port of 8729 will be used unless overridden.
Fixed a bug where event listeners that channels added to a connection weren't getting cleaned up. Made the Connection.channels object accessible to users. It's an object containing all active channels keyed by channel id.
Updated docs to warn that if 'error' events aren't caught, an "Unhandled event" exception may be thrown. Additional info on TLS options was also added including a link to the Node documentation. To external users, Connection.channels is now a frozen clone rather than the live object. To facilitate this, the circular reference from Channel to Connection was removed. Internally, all properties of Channel and Connection are now stored in their respective private stores even if they're exposed publically. Now there's no ambiguity about whether a property is accessed with 'this' or '_(this)'. Intenally, they should be accessed with '_(this)'.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.