Accept hostname lookup family option when creating WebSockets#962
Merged
lpinca merged 1 commit intowebsockets:masterfrom Jan 11, 2017
Merged
Accept hostname lookup family option when creating WebSockets#962lpinca merged 1 commit intowebsockets:masterfrom
family option when creating WebSockets#962lpinca merged 1 commit intowebsockets:masterfrom
Conversation
lpinca
reviewed
Jan 11, 2017
|
|
||
| it('should accept the family option', function (done) { | ||
| const wss = new WebSocketServer({ host: '::1', port: ++port }, () => { | ||
| const ws = new WebSocket(`ws://localhost:${port}`, {family: 6}); |
Member
There was a problem hiding this comment.
Can you please add spaces inside the options object? { family: 6 }.
lpinca
reviewed
Jan 11, 2017
| it('should accept the family option', function (done) { | ||
| const wss = new WebSocketServer({ host: '::1', port: ++port }, () => { | ||
| const ws = new WebSocket(`ws://localhost:${port}`, {family: 6}); | ||
| }); |
Member
There was a problem hiding this comment.
Can you please add a blank line after this?
lpinca
approved these changes
Jan 11, 2017
Contributor
Author
|
Done! I think there's an eslint rule for the spaces-in-objects, btw :) |
Member
|
@hansonw yeah :) we are using semistandard and it doesn't enforce that. |
Member
|
Thanks! |
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 free
to 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.
http.requestaccepts afamilyoption to specify the IP address family to use when resolving the server hostname. Seems pretty reasonable to accept this from the WebSocket side and forward it over to thehttprequest call.Specifically, this is useful for Facebook since we have IPv6 only development servers with IPv4 proxies (in which case we need websockets to connect to the IPv6 address)