Commit 4b4de6a8 authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

readme

parent eb450c7b
# 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment