MConnConfig returns an MConnConfig with fields updated from the P2PConfig.
(cfg *config.P2PConfig)
| 33 | // MConnConfig returns an MConnConfig with fields updated |
| 34 | // from the P2PConfig. |
| 35 | func 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 |
no test coverage detected