From 5b5e3090955c1b6c1e7a8cb97b43de8d099f5303 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Mon, 9 Jul 2018 12:55:09 -0700 Subject: [PATCH] feat(server): add `Builder::http1_pipeline_flush` configuration However, you probably shouldn't use it! It's `doc(hidden)`, since it isn't the truest pipeline support. Instead, it just prevents flushing until read buffer has been consumed. It's only real use is for silly pipeline benchmarks. --- src/server/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/server/mod.rs b/src/server/mod.rs index 765f5ffa5e..f07ee03554 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -176,6 +176,16 @@ impl Builder { self } + // Sets whether to bunch up HTTP/1 writes until the read buffer is empty. + // + // This isn't really desirable in most cases, only really being useful in + // silly pipeline benchmarks. + #[doc(hidden)] + pub fn http1_pipeline_flush(mut self, val: bool) -> Self { + self.protocol.pipeline_flush(val); + self + } + /// Set whether HTTP/1 connections should try to use vectored writes, /// or always flatten into a single buffer. ///