builder: Expose MaxChanCount (#722)

This commit is contained in:
Tanguy 2022-05-25 17:59:42 +02:00 committed by GitHub
parent 7323ecc9c4
commit ca3f4e8701
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions

View File

@ -86,12 +86,17 @@ proc withSignedPeerRecord*(b: SwitchBuilder, sendIt = true): SwitchBuilder =
b.sendSignedPeerRecord = sendIt
b
proc withMplex*(b: SwitchBuilder, inTimeout = 5.minutes, outTimeout = 5.minutes): SwitchBuilder =
proc withMplex*(
b: SwitchBuilder,
inTimeout = 5.minutes,
outTimeout = 5.minutes,
maxChannCount = 200): SwitchBuilder =
proc newMuxer(conn: Connection): Muxer =
Mplex.new(
conn,
inTimeout = inTimeout,
outTimeout = outTimeout)
inTimeout,
outTimeout,
maxChannCount)
b.mplexOpts = MplexOpts(
enable: true,