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.
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
feat(tcpreuse): add options for sharing TCP listeners amongst TCP, WS and WSS transports #2984
base: master
Are you sure you want to change the base?
feat(tcpreuse): add options for sharing TCP listeners amongst TCP, WS and WSS transports #2984
Changes from 15 commits
6281130
2ae20f4
05ee445
3457a7b
ac8b478
6d5fa53
0115a62
cdbf16c
7f4f875
00c9403
2c053d8
7e34d05
e465b29
677222a
8c334af
b686b80
a28a244
a39490f
76f560b
c314a2a
56dabd4
9ebfc89
a722a7c
85be1f5
18af914
f9f39b7
9ca4ae7
3d26583
3487369
74e9c05
fd53643
ccd1609
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This API has the nice property of keeping all current code same and enabling sharing by just specifying
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.
As
libp2p.New
user I will wonder why I need to explicitly pass this Option to enable sharing for TCP ports, but don't have to do anything extra for UDP ones.No chance of making this implicit? Or at least explain in godoc comment why this needs to be explicit?
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.
The main reason is that I want to get some confidence here before defaulting this behavior to on. In a future release it'll be the default and you wouldn't need this.
Aside: UDP transports don't currently share the port if you use port
0
across them (this does). That's also something that I'd like to change in a future release.I'll update the comment.