Skip to content
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

Expose bufferedAmount #168

Merged
merged 4 commits into from Mar 31, 2013
Merged

Expose bufferedAmount #168

merged 4 commits into from Mar 31, 2013

Conversation

Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
@arlolra
Copy link
Contributor

@arlolra arlolra commented Mar 22, 2013

http://www.w3.org/TR/2011/WD-websockets-20110929/

The bufferedAmount attribute must return the number of bytes of application data (UTF-8 text and binary data) that have been queued using send() but that, as of the last time the event loop started executing a task, had not yet been transmitted to the network.

* @api public
*/

WebSocket.prototype.__defineGetter__('bufferedAmount', function() {
Copy link
Contributor

@NodeGuy NodeGuy Mar 29, 2013

__defineGetter__ is non-standard and deprecated. You can use Object.defineProperty instead.

Copy link
Contributor Author

@arlolra arlolra Mar 29, 2013

Thanks, fixed.

@NodeGuy
Copy link
Contributor

@NodeGuy NodeGuy commented Mar 30, 2013

Thanks for your contribution. Please add a test for the new feature.

@arlolra
Copy link
Contributor Author

@arlolra arlolra commented Mar 30, 2013

@ballbearing Good point. Tests added.

einaros added a commit that referenced this issue Mar 31, 2013
@einaros einaros merged commit c821937 into websockets:master Mar 31, 2013
@einaros
Copy link
Contributor

@einaros einaros commented Mar 31, 2013

Thanks a heap!

@arlolra arlolra deleted the bufferedAmount branch May 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment