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

doc: fixup socket.remoteAddress #4198

Closed
wants to merge 1 commit into from
Closed

doc: fixup socket.remoteAddress #4198

wants to merge 1 commit into from

Conversation

baloo
Copy link
Contributor

@baloo baloo commented Dec 8, 2015

remoteAddress may be undefined under certain conditions

@@ -413,7 +413,8 @@ Returns `socket`.
### socket.remoteAddress

The string representation of the remote IP address. For example,
`'74.125.127.100'` or `'2001:4860:a005::68'`.
`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if
socket is destroyed (client disconnected, ...).
Copy link
Member

Choose a reason for hiding this comment

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

The parenthetical seems confusing more than clarifying. I would say either remove it, or change it to be more explicit: (for example, if the client disconnected)

Copy link
Member

Choose a reason for hiding this comment

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

Nit: if socket is -> if the socket is

remoteAddress may be undefined under certain conditions

Signed-off-by: Arthur Gautier <baloo@gandi.net>
@baloo
Copy link
Contributor Author

baloo commented Dec 8, 2015

@Trott fixed thanks

@mscdex mscdex added doc Issues and PRs related to the documentations. net Issues and PRs related to the net subsystem. labels Dec 8, 2015
@evanlucas
Copy link
Contributor

LGTM

baloo pushed a commit to baloo/forwarded that referenced this pull request Dec 9, 2015
see nodejs/node#4198

test case:
``` javascript
var net = require('net');
var server = net.createServer(function(c) { //'connection' listener
  c.on('end', function() {
    console.log(c.remoteAddress);
    server.close();
  });
});
server.listen(8124, function() {
  var client = net.connect({port: 8124}, function(c) {
    client.end();
  });
});
```

Signed-off-by: Arthur Gautier <baloo@gandi.net>
baloo pushed a commit to baloo/forwarded that referenced this pull request Dec 9, 2015
see nodejs/node#4198

test case:
``` javascript
var net = require('net');
var server = net.createServer(function(c) { //'connection' listener
  c.on('end', function() {
    console.log(c.remoteAddress);
    server.close();
  });
});
server.listen(8124, function() {
  var client = net.connect({port: 8124}, function(c) {
    client.end();
  });
});
```

Signed-off-by: Arthur Gautier <baloo@gandi.net>
@jasnell
Copy link
Member

jasnell commented Dec 11, 2015

LGTM

rvagg pushed a commit that referenced this pull request Dec 14, 2015
remoteAddress may be undefined under certain conditions

Signed-off-by: Arthur Gautier <baloo@gandi.net>

PR-URL: #4198
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
@rvagg
Copy link
Member

rvagg commented Dec 14, 2015

LGTM, landed @ 671347c

Looks like this is your first contribution to core @baloo, thanks for the PR and welcome on board!

@rvagg rvagg closed this Dec 14, 2015
cjihrig pushed a commit that referenced this pull request Dec 15, 2015
remoteAddress may be undefined under certain conditions

Signed-off-by: Arthur Gautier <baloo@gandi.net>

PR-URL: #4198
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
@rvagg rvagg mentioned this pull request Dec 17, 2015
MylesBorins pushed a commit that referenced this pull request Dec 29, 2015
remoteAddress may be undefined under certain conditions

Signed-off-by: Arthur Gautier <baloo@gandi.net>

PR-URL: #4198
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
MylesBorins pushed a commit that referenced this pull request Jan 19, 2016
remoteAddress may be undefined under certain conditions

Signed-off-by: Arthur Gautier <baloo@gandi.net>

PR-URL: #4198
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
@MylesBorins MylesBorins mentioned this pull request Jan 19, 2016
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
remoteAddress may be undefined under certain conditions

Signed-off-by: Arthur Gautier <baloo@gandi.net>

PR-URL: nodejs#4198
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. net Issues and PRs related to the net subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants