mirror of
https://github.com/status-im/status-go.git
synced 2025-01-09 14:16:21 +00:00
eeca435064
Update vendor Integrate rendezvous into status node Add a test with failover using rendezvous Use multiple servers in client Use discovery V5 by default and test that node can be started with rendezvous discovet Fix linter Update rendezvous client to one with instrumented stream Address feedback Fix test with updated topic limits Apply several suggestions Change log to debug for request errors because we continue execution Remove web3js after rebase Update rendezvous package
26 lines
489 B
Go
26 lines
489 B
Go
package tcpreuse
|
|
|
|
import (
|
|
"errors"
|
|
"sync"
|
|
|
|
logging "github.com/ipfs/go-log"
|
|
)
|
|
|
|
var log = logging.Logger("reuseport-transport")
|
|
|
|
// ErrWrongProto is returned when dialing a protocol other than tcp.
|
|
var ErrWrongProto = errors.New("can only dial TCP over IPv4 or IPv6")
|
|
|
|
// Transport is a TCP reuse transport that reuses listener ports.
|
|
type Transport struct {
|
|
v4 network
|
|
v6 network
|
|
}
|
|
|
|
type network struct {
|
|
mu sync.RWMutex
|
|
listeners map[*listener]struct{}
|
|
dialer dialer
|
|
}
|