1
0
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:
源文雨
2024-08-06 20:30:33 +08:00
parent ea768f88f9
commit b71a0541bd
8 changed files with 198 additions and 47 deletions

View File

@@ -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
}