Uh oh!
There was an error while loading. Please reload this page.
net: cleanup connect logic and add ability to specify custom lookup function - #1505
Closed
evanlucas wants to merge 2 commits into
Closed
net: cleanup connect logic and add ability to specify custom lookup function#1505evanlucas wants to merge 2 commits into
evanlucas wants to merge 2 commits into
Conversation
Separates out the lookup logic for net.Socket. In the event the `host` property is an IP address, the lookup is skipped.
There was a problem hiding this comment.
Add type check like
if(typeoflookup!=='function'){thrownewTypeError('lookup should be a function.');}There was a problem hiding this comment.
ok is unused variable?? need to check the ok is true ??
If ok is unused, remove the variable.
ContributorAuthor
There was a problem hiding this comment.
oops, check was missing. Added
evanlucas
commented
Apr 23, 2015
ContributorAuthor
@chrisdickinson I'd also like to get your sign-off if you don't mind since you opened the issue |
Allows customization of the lookup function used when Socket.prototype.connect is called using a hostname.
evanlucas
commented
Apr 23, 2015
ContributorAuthor
@brendanashworth it actually isn't called |
brendanashworth
commented
Apr 23, 2015
Contributor
@evanlucas aye! Thanks for catching that, my fault. |
chrisdickinson
commented
Apr 23, 2015
Contributor
LGTM! |
yosuke-furukawa
commented
Apr 24, 2015
Member
LGTM2! |
evanlucas added a commit
that referenced
this pull request
Apr 24, 2015
Separates out the lookup logic for net.Socket. In the event the `host` property is an IP address, the lookup is skipped. PR-URL: #1505 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com> Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
evanlucas added a commit
that referenced
this pull request
Apr 24, 2015
Allows customization of the lookup function used when Socket.prototype.connect is called using a hostname. PR-URL: #1505 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com> Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
evanlucas
commented
Apr 24, 2015
ContributorAuthor
rvagg added a commit
that referenced
this pull request
May 4, 2015
PR-URL: #1532 Notable Changes: * crypto: significantly reduced memory usage for TLS (Fedor Indutny & Сковорода Никита Андреевич) #1529 * net: socket.connect() now accepts a 'lookup' option for a custom DNS resolution mechanism, defaults to dns.lookup() (Evan Lucas) #1505 * npm: Upgrade npm to 2.9.0. See the v2.8.4 and v2.9.0 release notes for details. Notable items: - Add support for default author field to make npm init -y work without user-input (@othiym23) npm/npm/d8eee6cf9d - Include local modules in npm outdated and npm update (@ArnaudRinquin) npm/npm#7426 - The prefix used before the version number on npm version is now configurable via tag-version-prefix (@kkragenbrink) npm/npm#8014 * os: os.tmpdir() is now cross-platform consistent and will no longer returns a path with a trailling slash on any platform (Christian Tellnes) #747 * process: - process.nextTick() performance has been improved by between 2-42% across the benchmark suite, notable because this is heavily used across core (Brian White) #1548 - New process.geteuid(), process.seteuid(id), process.getegid() and process.setegid(id) methods allow you to get and set effective UID and GID of the process (Evan Lucas) #1536 * repl: - REPL history can be persisted across sessions if the NODE_REPL_HISTORY_FILE environment variable is set to a user accessible file, NODE_REPL_HISTORY_SIZE can set the maximum history size and defaults to 1000 (Chris Dickinson) #1513 - The REPL can be placed in to one of three modes using the NODE_REPL_MODE environment variable: sloppy, strict or magic (default); the new magic mode will automatically run "strict mode only" statements in strict mode (Chris Dickinson) #1513 * smalloc: the 'smalloc' module has been deprecated due to changes coming in V8 4.4 that will render it unusable * util: add Promise, Map and Set inspection support (Christopher Monsanto) #1471 * V8: upgrade to 4.2.77.18, see the ChangeLog for full details. Notable items: - Classes have moved out of staging; the class keyword is now usable in strict mode without flags - Object literal enhancements have moved out of staging; shorthand method and property syntax is now usable ({ method() { }, property }) - Rest parameters (function(...args) {}) are implemented in staging behind the --harmony-rest-parameters flag - Computed property names ({['foo'+'bar']:'bam'}) are implemented in staging behind the --harmony-computed-property-names flag - Unicode escapes ('\u{xxxx}') are implemented in staging behind the --harmony_unicode flag and the --harmony_unicode_regexps flag for use in regular expressions * Windows: - Random process termination on Windows fixed (Fedor Indutny) #1512 / #1563 - The delay-load hook introduced to fix issues with process naming (iojs.exe / node.exe) has been made opt-out for native add-ons. Native add-ons should include 'win_delay_load_hook': 'false' in their binding.gyp to disable this feature if they experience problems . (Bert Belder) #1433 * Governance: - Rod Vagg (@rvagg) was added to the Technical Committee (TC) - Jeremiah Senkpiel (@Fishrock123) was added to the Technical Committee (TC)
This file contains hidden or 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
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Separates out the lookup logic for net.Socket. In the event the
hostproperty is an IP address, the lookup is skipped.Also allows customization of the lookup function in Socket.prototype.connect.
Ref: nodejs/node-v0.x-archive#8475
I used
lookupinstead ofresolvesince we are actually calling lookup currently. I wasn't sure if we wanted to go ahead and change to using resolve or not. If we did, what kind of impact would that have?