mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-26 05:42:17 +08:00
feat(p2p): add more link to tcp
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
type Config struct {
|
||||
DialTimeout time.Duration
|
||||
PeersTimeout time.Duration
|
||||
KeepInterval time.Duration
|
||||
ReceiveChannelSize int
|
||||
}
|
||||
|
||||
@@ -34,6 +35,7 @@ func newEndpoint(endpoint string, configs ...any) (*EndPoint, error) {
|
||||
addr: net.TCPAddrFromAddrPort(addr),
|
||||
dialtimeout: cfg.DialTimeout,
|
||||
peerstimeout: cfg.PeersTimeout,
|
||||
keepinterval: cfg.KeepInterval,
|
||||
recvchansize: cfg.ReceiveChannelSize,
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user