diff --git a/docs/pages/kotlinx-rpc/topics/configuration.topic b/docs/pages/kotlinx-rpc/topics/configuration.topic index c12745a25..101c96eec 100644 --- a/docs/pages/kotlinx-rpc/topics/configuration.topic +++ b/docs/pages/kotlinx-rpc/topics/configuration.topic @@ -92,8 +92,8 @@ The default value is Duration.INFINITE.
  • - perCallBufferSize - size of the buffer for one call. - Call can be a stream or a single message. + perCallBufferSize - size of the messages buffer for one call. + The buffer ignores the size in bytes and only counts the number of messages. This effectively provides a backpressure mechanism. If a peer is slow to process the message during a call, the buffer will be filled up and diff --git a/krpc/krpc-core/src/commonMain/kotlin/kotlinx/rpc/krpc/KrpcConfig.kt b/krpc/krpc-core/src/commonMain/kotlin/kotlinx/rpc/krpc/KrpcConfig.kt index 9ed87ade2..bace1d83c 100644 --- a/krpc/krpc-core/src/commonMain/kotlin/kotlinx/rpc/krpc/KrpcConfig.kt +++ b/krpc/krpc-core/src/commonMain/kotlin/kotlinx/rpc/krpc/KrpcConfig.kt @@ -79,10 +79,9 @@ public sealed class KrpcConfigBuilder protected constructor() { /** * A buffer size for a single call. * - * The default value is 1000, - * meaning that only after one message is handled - the next one will be sent. + * The default value is 1000 messages independent of their size in bytes. * - * This buffer also applies to how many messages are cached with [waitTimeout] + * This buffer also applies to how many messages are cached with [waitTimeout]. */ public var perCallBufferSize: Int = 1000 }