-
-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Set keepalive after auth, save mem if auth fails * Enhance & Optimize connect handler - For 06fc839, raise an "invalid protocol" callback error if there is - aedes unsupported mqtt version: CONNACK return Code = 1 - client id length > 23 [MQTT 3.1.0 only]: CONNACK return Code = 2 - Added preConnect handler in handleConnect between earliest connect checks and normal checks. This is useful for users if they want to do some earilest DDoS check before server send any responses back, in this phrase connected=false - Emit `connackSent` event and set connactSent=true if CONNACK is sent, not only after `client` event but also when normal connect checks phrase if necessary - Added packet arguments in `connackSent` event - set clientID to 'aedes_' + shortid() if empty [MQTT 3.1.1], it is better to keep it within 23 chars for better compatibility - Emit `clientReady` event after we send back all offline messages to client - Optimize negate function - Optimize doConnack function and we could re-use it - Set keepalive after authentication, save some resoures if there are plenty of failed authentication * Clear connect timer earilest, performance-wise * Refactored * Drop useless comments * Removed unused done arguments * Added preConnect doc in README.md * Used connect callback/event in unit tests * Make preConnect() having a callback * Fixed preConnect unit test * Split return in favour of V8 optimization
- Loading branch information
Showing
14 changed files
with
671 additions
and
321 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.