-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
Dgram buffers #13623
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
Dgram buffers #13623
Changes from 1 commit
9d6cd42
b84bf95
8aed7aa
f7c1aa6
a99ec11
2581c09
b0ac4ff
f6bf7f2
d5789c0
cd79a58
de458d1
f196be9
f4d3564
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
setRecvBufferSize(int) and setSendBufferSize(int)
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -636,6 +636,25 @@ Socket.prototype.unref = function() { | |
| return this; | ||
| }; | ||
|
|
||
|
|
||
| Socket.prototype.setRecvBufferSize = function(size) { | ||
| var err = this._handle.setRecvBufferSize(size); | ||
|
|
||
| if (err) { | ||
| throw errnoException(err, 'setRecvBufferSize'); | ||
| } | ||
| }; | ||
|
|
||
|
|
||
| Socket.prototype.setSendBufferSize = function(size) { | ||
| var err = this._handle.setSendBufferSize(size); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we'd prefer a check in JS that will throw an
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It’s not an uint32 check, though. I think
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wow, completely forgot about the existence of |
||
|
|
||
| if (err) { | ||
| throw errnoException(err, 'setSendBufferSize'); | ||
| } | ||
| }; | ||
|
|
||
|
|
||
| module.exports = { | ||
| _createSocketHandle, | ||
| createSocket, | ||
|
|
||
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.
Style nit: Core prefers no curly braces on single line
ifs.