Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-reuseport
Commits
4b4de6a8
Commit
4b4de6a8
authored
Jan 18, 2015
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
readme
parent
eb450c7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
README.md
README.md
+9
-1
No files found.
README.md
View file @
4b4de6a8
# go-reuseport
This package enables listening and dialing from _the same_ TCP or UDP port. This means that the following sockopts are set:
This package enables listening and dialing from _the same_ TCP or UDP port.
This means that the following sockopts are set:
```
SO_REUSEADDR
...
...
@@ -9,6 +10,13 @@ SO_REUSEPORT
-
godoc: https://godoc.org/github.com/jbenet/go-reuseport
This is a simple package to get around the problem of reusing addresses.
The go
`net`
package (to my knowledge) does not allow setting socket options.
This is particularly problematic when attempting to do TCP NAT holepunching,
which requires a process to both Listen and Dial on the same TCP port.
This package makes this possible for me. It is a pretty narrow use case, but
perhaps this package can grow to be more general over time.
## Examples
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment