-
Notifications
You must be signed in to change notification settings - Fork 712
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
SIP.EventEmitter inherits from Node's EventEmitter #66
Closed
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
josephfrazier
referenced
this pull request
in josephfrazier/SIP.js
Jul 17, 2014
This avoid sharing state between multiple instances.
Closed
b77e5ee
to
f0d3b2c
Compare
8447dcf
to
a160b80
Compare
Repository owner
locked and limited conversation to collaborators
Nov 24, 2014
(I don't really know what locking this does.) I just wanted to note that this has been accepted for the 0.7.0 version, rather than #64. |
a160b80
to
59129bd
Compare
Excellent, I rebased onto master and added 59129bd to keep the bundle size down. Of course, I can squash the commits down before this gets merged, if desired. |
59129bd
to
1f9485e
Compare
This reduces code duplication by using a well known/tested module: http://nodejs.org/api/events.html This also preserves most of the public API: http://sipjs.com/api/0.6.0/eventEmitter/ See below for more details: * #on, #once and #off do NOT take third arguments (bindTarget) listeners should be explicitly bound to their objects before passing to EventEmitter methods * #setMaxListeners works like Node's - does NOT prevent extra listeners - passing 0 allows unlimited listeners * #emit no longer returns `this`, works like Node's * #checkListener has been removed The rest of SIP.js uses: emitter.listeners(eventName).length instead of: emitter.checkListener(eventName) * remove all other methods and their tests Supporting changes: * test/spec/SpecSession.js: define .logger on the constructed Session This prevents tests from failing due to an artificially constructed Session's logger being undefined since the Session no longer has a logger by virtue of being an EventEmitter * src/Session.js: fix the following methods to correctly return `this`: - failed - rejected - canceled - accepted - terminated - connecting
(elsewhere): don't call #off except for in its tests
This avoids bundling the module into the browser build.
1f9485e
to
0c2e23a
Compare
Rebased and merged. |
josephfrazier
pushed a commit
to josephfrazier/SIP.js
that referenced
this pull request
Apr 27, 2015
See the following: 468c5d7 4e7cb02 onsip#66 browserify/events#10
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
An alternative to #64
resolves #64