MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / MConnConfig

Function MConnConfig

p2p/switch.go:35–42  ·  view source on GitHub ↗

MConnConfig returns an MConnConfig with fields updated from the P2PConfig.

(cfg *config.P2PConfig)

Source from the content-addressed store, hash-verified

33// MConnConfig returns an MConnConfig with fields updated
34// from the P2PConfig.
35func MConnConfig(cfg *config.P2PConfig) conn.MConnConfig {
36 mConfig := conn.DefaultMConnConfig()
37 mConfig.FlushThrottle = cfg.FlushThrottleTimeout
38 mConfig.SendRate = cfg.SendRate
39 mConfig.RecvRate = cfg.RecvRate
40 mConfig.MaxPacketMsgPayloadSize = cfg.MaxPacketMsgPayloadSize
41 return mConfig
42}
43
44//-----------------------------------------------------------------------------
45

Callers 4

createTransportFunction · 0.92
createTransportFunction · 0.92
addPeerWithConnectionMethod · 0.70
MakeSwitchFunction · 0.70

Calls 1

DefaultMConnConfigFunction · 0.92

Tested by

no test coverage detected