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

Dgram buffers #13623

Closed
wants to merge 13 commits into from
Closed

Dgram buffers #13623

wants to merge 13 commits into from

Conversation

DamienOReilly
Copy link
Contributor

@DamienOReilly DamienOReilly commented Jun 11, 2017

Add support to allow the dgram lib to set the SO_SNDBUF & SO_RCVBUF socket buffer sizes.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc, dgram

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. dgram Issues and PRs related to the dgram subsystem / UDP. labels Jun 11, 2017
@refack
Copy link
Contributor

refack commented Jun 11, 2017

@refack refack reopened this Jun 11, 2017
@refack refack added the wip Issues and PRs that are still a work in progress. label Jun 11, 2017
@refack
Copy link
Contributor

refack commented Jun 11, 2017

Copy link
Contributor

@refack refack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % Some nits

doc/api/dgram.md Outdated
@@ -396,6 +396,26 @@ decremented to 0 by a router, it will not be forwarded.
The argument passed to to `socket.setMulticastTTL()` is a number of hops
between 0 and 255. The default on most systems is `1` but can vary.

### socket.setRecvBufferSize(size)
<!-- YAML
added: vx.x.x
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put REPLACEME we have a macro that fills it it

doc/api/dgram.md Outdated

### socket.setSendBufferSize(size)
<!-- YAML
added: vx.x.x
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@refack
Copy link
Contributor

refack commented Jun 11, 2017

CI sais 🔴
Error code is probably OS dependent, not sure what's the policy, probably you should use a regex like /^Error: setRecvBufferSize [A-Z]+^/

339	parallel/test-dgram-set-socket-buffer-size	
duration_ms	0.64
severity	fail
stack	
assert.js:569
    throw actual;
    ^

Error: setRecvBufferSize EBADF
    at exports._errnoException (util.js:1014:11)
    at Socket.setRecvBufferSize (dgram.js:647:11)
    at assert.throws (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-dgram-set-socket-buffer-size.js:12:12)
    at _tryBlock (assert.js:526:5)
    at _throws (assert.js:547:12)
    at Function.throws (assert.js:577:3)
    at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-dgram-set-socket-buffer-size.js:11:10)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)

@Trott
Copy link
Member

Trott commented Jun 12, 2017

/^Error: setRecvBufferSize [A-Z]+^/

...or even: /^Error: setRecvBufferSize E[A-Z]+^/

(Right? It will always start with E?)

args.Holder(),
args.GetReturnValue().Set(UV_EBADF));

CHECK(args[0]->IsUint32());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably don't want to crash when the user does socket.setRecvBufferSize(Infinity). Throwing a TypeError should be a better choice.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TimothyGu you mean on the JS side, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted, do you recommend:

  if (!args[0]->IsUint32()) {
    return env->ThrowTypeError("size must be an uint32");
  }

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend doing the type check in JS. Just something simple like:

const errors = require('internal/errors');

// then within the the functions
if (typeof size !== 'number')
  throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'size', 'number');

Copy link
Contributor Author

@DamienOReilly DamienOReilly Jun 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your input. Do you think I need to do any safety checking in udp_wrap.cc SetRecvBufferSize() or we assume only dgram.js will interact with udp_wrap ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, once the type checking is added to the js side, I would keep the CHECK in place on the native side. That should only be hit if we do something wrong in core or if the user is doing something they really shouldn't.

src/udp_wrap.cc Outdated

CHECK(args[0]->IsUint32());

int inputSize = args[0]->Uint32Value();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uint32Value without v8::Context specified is deprecated. Use args[0]->Uint32Value(info.GetIsolate()->GetCurrentContext()).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we generally prefer camelCase for JavaScript and snake case for C++.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, will see to this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use args[0]->Uint32Value(info.GetIsolate()->GetCurrentContext()).

That’s not necessary if you already checked args[0]->IsUint32(),args[0].As<Uint32>()->Value() should do instead.

lib/dgram.js Outdated
var err = this._handle.setRecvBufferSize(size);

if (err) {
throw errnoException(err, 'setRecvBufferSize');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would prefer using internal/errors here since this introduces new errors. The errno can be added.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lib/dgram.js Outdated


Socket.prototype.setSendBufferSize = function(size) {
var err = this._handle.setSendBufferSize(size);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because _handle.setSendBufferSize() includes a CHECK that will abort if size is not UInt32, these should do a proper type check in the js side. Otherwise users will not be happy.

Copy link
Contributor

Choose a reason for hiding this comment

The 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 internal/errors.TypeError
this is a good check Number.isFinite(num) && num <= Number.MAX_SAFE_INTEGER && num >= 0;
Ref: https://github.com/nodejs/node/blob/master/lib/internal/process.js#L31
Ref: https://github.com/nodejs/node/blob/master/lib/internal/process.js#L62

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a good check Number.isFinite(num) && num <= Number.MAX_SAFE_INTEGER && num >= 0;

It’s not an uint32 check, though. I think num >>> 0 === num would work.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, completely forgot about the existence of >>>
So much fun working with talented people 🕺

@@ -396,6 +396,26 @@ decremented to 0 by a router, it will not be forwarded.
The argument passed to to `socket.setMulticastTTL()` is a number of hops
between 0 and 255. The default on most systems is `1` but can vary.

### socket.setRecvBufferSize(size)
<!-- YAML
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to also include these as options when the Socket is created?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is a good idea.

@jasnell jasnell added the semver-minor PRs that contain new features and should be released in the next minor version. label Jun 12, 2017
src/udp_wrap.cc Outdated

CHECK(args[0]->IsUint32());

int inputSize = args[0]->Uint32Value();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we generally prefer camelCase for JavaScript and snake case for C++.

lib/dgram.js Outdated
Socket.prototype.setRecvBufferSize = function(size) {
var err = this._handle.setRecvBufferSize(size);

if (err) {
Copy link
Contributor

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.

doc/api/dgram.md Outdated
@@ -454,10 +474,14 @@ s.bind(1234, () => {

### dgram.createSocket(options[, callback])
<!-- YAML
added: v0.11.13
added: REPLACEME
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't change the version this was added. Each function does support it's own changelog though. See the child_process.spawn() docs for example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks.

lib/dgram.js Outdated
return Number.isFinite(size) &&
size <= Number.MAX_SAFE_INTEGER &&
size >= 0 &&
size >>> 0 === size;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function seems like a bit of overkill for detecting an unsigned int.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the last condition implies all the others, so it is sufficient.

lib/dgram.js Outdated
@@ -121,6 +122,12 @@ function Socket(type, listener) {

// If true - UV_UDP_REUSEADDR flag will be set
this._reuseAddr = options && options.reuseAddr;

if (options && options.recvBufferSize)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're adding more options, it might be better to just make sure options is an object. Adding these underscored properties also means we have to maintain them indefinitely.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, we could use the libuv calls to with value === 0 to get the current value.

Also, it looks like these underscored properties aren't used in setRecvBufferSize() and setSendBufferSize().

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DamienOReilly tl;dr, if you don't need them later, no need to store them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are used in startListening() which is called after the socket has been bound. They will in turn determine if setRecvBufferSize() and setSendBufferSize() are called if the specific options have been set against the Socket created with dgram.createSocket(). Otherwise setRecvBufferSize() and setSendBufferSize() can be called on the Socket object.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have to store these, I'd say use symbols. It's kind of ugly though because if the values are updated later, these values aren't kept in sync. And, libuv provides APIs to get those values.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@DamienOReilly DamienOReilly Jun 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cjihrig I guess extending this PR to add functionality to the interface in JS layer to use getsockopt down in libuv might be a good idea (e.g. getRecvBufferSize()). Therefore the symbol values holding initial options can be ignored after they are set against the socket when the listening event triggers.

lib/dgram.js Outdated
@@ -140,6 +147,12 @@ function startListening(socket) {
socket._receiving = true;
socket._bindState = BIND_STATE_BOUND;
socket.fd = -42; // compatibility hack

if (socket._recvBufferSize)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason these ifs can't be combined with the other ones?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The buffer sizes can only be set after the socket has been created.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, right, sorry. I was reading the diff as if the changes were in the same function. Might be a good case for #5496 though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem. Might look at that next!

type: Error,
message: /^Coud not set buffer size: E[A-Z]+$/
}));

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove these extra blank lines.

Copy link
Contributor

@refack refack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting close 👍

lib/dgram.js Outdated
@@ -121,6 +122,12 @@ function Socket(type, listener) {

// If true - UV_UDP_REUSEADDR flag will be set
this._reuseAddr = options && options.reuseAddr;

if (options && options.recvBufferSize)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DamienOReilly tl;dr, if you don't need them later, no need to store them.

lib/dgram.js Outdated
var err = this._handle.setSendBufferSize(size);

if (err)
throw new errors.TypeError('ERR_SOCKET_SET_BUFFER_SIZE',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INHO this should be a regular error.Error (same signature)

lib/dgram.js Outdated
@@ -326,6 +350,11 @@ function enqueue(self, toEnqueue) {
}


function isValidSize(size) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can just inline this in the only place it's used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing. It makes sense.

added: REPLACEME
-->

* Returns {number} the `SO_RCVBUF` socket receive buffer size in bytes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a thought, but we might not need to mention SO_RCVBUF and SO_SNDBUF at all. They aren't really needed to work with the API.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are not needed, but I though it was no harm having them mentioned in the docs. I'd like to get a few people's opinion on this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that googling SO_RCVBUF gives very good results (linux man and MSDN) so I'm +0.5

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can always add something like (see socket(7)) if you like, the doctool will expand that into a link.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for the record, I'm not opposed to including them. I just thought we might be able to get by without them. I'm open to whatever everyone thinks is best here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I know, the only reason I included them was that I was familiar with setting the buffer sizes with the JDK, and the javadocs mentioned these property names. When I started working on a small app to get more familiar with javascript, I was goggle'in around "node.js SO_RCVBUF" to see if anyone had already added or was in the process of adding buffer size setting support in node.js.

src/udp_wrap.cc Outdated
CHECK(args[1]->IsUint32());
int size = (int)args[0].As<Uint32>()->Value();

int err = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't really need to initialize this to zero. It will always be set by one branch of the following if statement.

src/udp_wrap.cc Outdated
int err = 0;
if (args[1].As<Uint32>()->Value() == 0)
err = uv_recv_buffer_size(reinterpret_cast<uv_handle_t*>(&wrap->handle_),
&size);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you line up &size with reinterpret_cast.

src/udp_wrap.cc Outdated
err = uv_recv_buffer_size(reinterpret_cast<uv_handle_t*>(&wrap->handle_),
&size);
else
err = uv_send_buffer_size(reinterpret_cast<uv_handle_t*>(&wrap->handle_),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here about alignment.

src/udp_wrap.cc Outdated
if (err != 0) {
std::string syscall;
if (args[1].As<Uint32>()->Value() == 0)
syscall = "uv_recv_buffer_size";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe drop syscall and just duplicate the env->ThrowUVException() call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hehe yes, I originally had it this way but the duplication itched at me!


// Ensure buffer sizes can be set
{
const socket = dgram.createSocket({ type: 'udp4',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little surprised the linter doesn't complain about this. Can you move type to the next line with two spaces indentation.

// Should throw error if the socket is never bound.
const socket = dgram.createSocket('udp4');

assert.throws(() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The duplication here could probably be reduced.

socket.setRecvBufferSize(-1);
}, common.expectsError({
code: 'ERR_SOCKET_BAD_BUFFER_SIZE',
type: Error,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be a TypeError?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it should, I am throwing TypeError in dgram.js, however the test is passing. Regardless I will update the test.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

common.expectsError() is subtly broken. It relies on instanceof to check the error type. So a TypeError is an instance of Error, which is why this passed. The simplest fix might be to check error.constructor inside of common.expectsError(). But that will require updating a bunch of tests because we're now using custom errors all over the place.

cc: @nodejs/testing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

common.expectsError() is subtly broken

Ref: #13682

const socket = dgram.createSocket('udp4');

socket.bind(common.mustCall(() => {
assert.throws(() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment about duplication here.

Copy link
Contributor

@refack refack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like 💯

added: REPLACEME
-->

* Returns {number} the `SO_RCVBUF` socket receive buffer size in bytes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that googling SO_RCVBUF gives very good results (linux man and MSDN) so I'm +0.5

@refack refack removed the wip Issues and PRs that are still a work in progress. label Jun 14, 2017
@DamienOReilly
Copy link
Contributor Author

Hi all, are there any outstanding comments you need addressed in this PR?

@Trott
Copy link
Member

Trott commented Jun 20, 2017

Hi all, are there any outstanding comments you need addressed in this PR?

@cjihrig You currently have the blocking red X on this one...

@Trott
Copy link
Member

Trott commented Jun 20, 2017

Two things:

  • We'll probably want to benchmark this change before landing.

  • lib/dgram.js currently has 100% test coverage. We should probably run the coverage tool on these changes to make sure there aren't untested code paths with this change.

maclover7 referenced this pull request in maclover7/node Sep 17, 2017
Will break YAML parsing!

Original Node error:

```
Jonathans-MBP:node jon$ node tools/doc/generate.js --format=json doc/api/dgram.md
Input file = doc/api/dgram.md
{ Error
    at generateError (/Users/jon/code/nodejs/node/tools/eslint/node_modules/js-yaml/lib/js-yaml/loader.js:165:10)
    at throwError (/Users/jon/code/nodejs/node/tools/eslint/node_modules/js-yaml/lib/js-yaml/loader.js:171:9)
    at readBlockSequence (/Users/jon/code/nodejs/node/tools/eslint/node_modules/js-yaml/lib/js-yaml/loader.js:935:7)
    at composeNode (/Users/jon/code/nodejs/node/tools/eslint/node_modules/js-yaml/lib/js-yaml/loader.js:1331:12)
    at readBlockMapping (/Users/jon/code/nodejs/node/tools/eslint/node_modules/js-yaml/lib/js-yaml/loader.js:1062:11)
    at composeNode (/Users/jon/code/nodejs/node/tools/eslint/node_modules/js-yaml/lib/js-yaml/loader.js:1332:12)
    at readDocument (/Users/jon/code/nodejs/node/tools/eslint/node_modules/js-yaml/lib/js-yaml/loader.js:1492:3)
    at loadDocuments (/Users/jon/code/nodejs/node/tools/eslint/node_modules/js-yaml/lib/js-yaml/loader.js:1548:5)
    at load (/Users/jon/code/nodejs/node/tools/eslint/node_modules/js-yaml/lib/js-yaml/loader.js:1569:19)
    at Object.safeLoad (/Users/jon/code/nodejs/node/tools/eslint/node_modules/js-yaml/lib/js-yaml/loader.js:1591:10)
  name: 'YAMLException',
  reason: 'bad indentation of a sequence entry',
  mark:
   Mark {
     name: null,
     buffer: '\nadded: v0.11.13\nchanges:\n  - version: REPLACEME\n    pr-url: https://github.com/nodejs/node/pull/14560\n    description: The `lookup` option is supported.\n  - version: REPLACEME\n    pr-url: https://github.com/nodejs/node/pull/13623\n    description: `recvBufferSize` and `sendBufferSize` options are supported now.\n\u0000',
     position: 248,
     line: 8,
     column: 17 },
  message: 'bad indentation of a sequence entry at line 9, column 18:\n        description: `recvBufferSize` and `sendBuffer ... \n                     ^' }
```

Then I extracted out the problematic YAML, and tried running through Ruby as a
separate `.yml` file:

```
Psych::SyntaxError: (<unknown>): found character that cannot start any token while scanning for the next token at line 8 column 18
	from /Users/jon/.rbenv/versions/2.4.0/lib/ruby/2.4.0/psych.rb:377:in `parse'
	from /Users/jon/.rbenv/versions/2.4.0/lib/ruby/2.4.0/psych.rb:377:in `parse_stream'
	from /Users/jon/.rbenv/versions/2.4.0/lib/ruby/2.4.0/psych.rb:325:in `parse'
	from /Users/jon/.rbenv/versions/2.4.0/lib/ruby/2.4.0/psych.rb:252:in `load'
	from (irb):7
	from /Users/jon/.rbenv/versions/2.4.0/bin/irb:11:in `<main>'
```
@jasnell
Copy link
Member

jasnell commented Sep 20, 2017

this would need to be backported for v8.x

@jasnell
Copy link
Member

jasnell commented Sep 20, 2017

This is not landing cleanly in v8.x because #14560 has not yet been backported.

@jasnell
Copy link
Member

jasnell commented Sep 20, 2017

#15402 needs to be backported along with this.

Qard pushed a commit to Qard/ayo that referenced this pull request Sep 21, 2017
* setRecvBufferSize(int) and setSendBufferSize(int)
* added docs for send/receive buffer sizes
* Added options support to set buffer sizes in
  dgram.createSocket().

PR-URL: nodejs/node#13623
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
cjihrig added a commit to cjihrig/node that referenced this pull request Sep 22, 2017
This commit refactors the get/set send/receive buffer size
methods in the following ways:

- Use booleans instead of strings and numbers to differentiate
between the send and receive buffers.
- Reduce the amount of branching and complexity in the C++ code.

Refs: nodejs#13623
PR-URL: nodejs#15483
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
addaleax pushed a commit to addaleax/ayo that referenced this pull request Sep 23, 2017
This commit refactors the get/set send/receive buffer size
methods in the following ways:

- Use booleans instead of strings and numbers to differentiate
between the send and receive buffers.
- Reduce the amount of branching and complexity in the C++ code.

Refs: nodejs/node#13623
PR-URL: nodejs/node#15483
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 28, 2017
* setRecvBufferSize(int) and setSendBufferSize(int)
* added docs for send/receive buffer sizes
* Added options support to set buffer sizes in
  dgram.createSocket().

PR-URL: #13623
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 28, 2017
This commit refactors the get/set send/receive buffer size
methods in the following ways:

- Use booleans instead of strings and numbers to differentiate
between the send and receive buffers.
- Reduce the amount of branching and complexity in the C++ code.

Refs: #13623
PR-URL: #15483
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 29, 2017
* setRecvBufferSize(int) and setSendBufferSize(int)
* added docs for send/receive buffer sizes
* Added options support to set buffer sizes in
  dgram.createSocket().

PR-URL: #13623
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 29, 2017
This commit refactors the get/set send/receive buffer size
methods in the following ways:

- Use booleans instead of strings and numbers to differentiate
between the send and receive buffers.
- Reduce the amount of branching and complexity in the C++ code.

Refs: #13623
PR-URL: #15483
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
MylesBorins pushed a commit that referenced this pull request Oct 3, 2017
* setRecvBufferSize(int) and setSendBufferSize(int)
* added docs for send/receive buffer sizes
* Added options support to set buffer sizes in
  dgram.createSocket().

PR-URL: #13623
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Oct 3, 2017
This commit refactors the get/set send/receive buffer size
methods in the following ways:

- Use booleans instead of strings and numbers to differentiate
between the send and receive buffers.
- Reduce the amount of branching and complexity in the C++ code.

Refs: #13623
PR-URL: #15483
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Oct 3, 2017
MylesBorins pushed a commit that referenced this pull request Oct 3, 2017
* setRecvBufferSize(int) and setSendBufferSize(int)
* added docs for send/receive buffer sizes
* Added options support to set buffer sizes in
  dgram.createSocket().

PR-URL: #13623
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Oct 3, 2017
This commit refactors the get/set send/receive buffer size
methods in the following ways:

- Use booleans instead of strings and numbers to differentiate
between the send and receive buffers.
- Reduce the amount of branching and complexity in the C++ code.

Refs: #13623
PR-URL: #15483
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
MylesBorins pushed a commit that referenced this pull request Oct 11, 2017
* setRecvBufferSize(int) and setSendBufferSize(int)
* added docs for send/receive buffer sizes
* Added options support to set buffer sizes in
  dgram.createSocket().

PR-URL: #13623
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Oct 11, 2017
This commit refactors the get/set send/receive buffer size
methods in the following ways:

- Use booleans instead of strings and numbers to differentiate
between the send and receive buffers.
- Reduce the amount of branching and complexity in the C++ code.

Refs: #13623
PR-URL: #15483
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
MylesBorins added a commit that referenced this pull request Oct 11, 2017
Notable Changes:

* deps:
  * update npm to 5.4.2
    #15600
  * upgrade libuv to 1.15.0
    #15745
  * update V8 to 6.1.534.42
    #15393
* dgram:
  * support for setting dgram socket buffer size
    #13623
* fs:
  * add support O_DSYNC file open constant
    #15451
* util:
  * deprecate obj.inspect for custom inspection
    #15631
* tools, build:
  * there is a fancy new macOS installer
    #15179
* Added new collaborator
  * bmeurer - Benedikt Meurer - https://github.com/bmeurer
  * kfarnung - Kyle Farnung - https://github.com/kfarnung

PR-URL: #15762
MylesBorins added a commit that referenced this pull request Oct 11, 2017
Notable Changes:

* deps:
  * update npm to 5.4.2
    #15600
  * upgrade libuv to 1.15.0
    #15745
  * update V8 to 6.1.534.42
    #15393
* dgram:
  * support for setting dgram socket buffer size
    #13623
* fs:
  * add support O_DSYNC file open constant
    #15451
* util:
  * deprecate obj.inspect for custom inspection
    #15631
* tools, build:
  * there is a fancy new macOS installer
    #15179
* Added new collaborator
  * bmeurer - Benedikt Meurer - https://github.com/bmeurer
  * kfarnung - Kyle Farnung - https://github.com/kfarnung

PR-URL: #15762
addaleax pushed a commit to addaleax/ayo that referenced this pull request Oct 12, 2017
Notable Changes:

* deps:
  * update npm to 5.4.2
    nodejs/node#15600
  * upgrade libuv to 1.15.0
    nodejs/node#15745
  * update V8 to 6.1.534.42
    nodejs/node#15393
* dgram:
  * support for setting dgram socket buffer size
    nodejs/node#13623
* fs:
  * add support O_DSYNC file open constant
    nodejs/node#15451
* util:
  * deprecate obj.inspect for custom inspection
    nodejs/node#15631
* tools, build:
  * there is a fancy new macOS installer
    nodejs/node#15179
* Added new collaborator
  * bmeurer - Benedikt Meurer - https://github.com/bmeurer
  * kfarnung - Kyle Farnung - https://github.com/kfarnung

PR-URL: nodejs/node#15762
@gibfahn
Copy link
Member

gibfahn commented Jan 15, 2018

Release team were -1 on landing on v6.x, if you disagree let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. dgram Issues and PRs related to the dgram subsystem / UDP. semver-minor PRs that contain new features and should be released in the next minor version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.