Skip to content

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 31 Oct 05:30
· 31 commits to main since this release
73d7dfc
  • base-http-client and base-http-server disable Nagle's algorithm (TCP_NODELAY) on each TCP connection they establish or accept, so small writes such as streamed frames on long-lived duplex exchanges are not delayed by Nagle's algorithm interacting with delayed acknowledgements. Set the new Options::tcp_nodelay to false to leave the socket options unchanged. Setting the option is best effort and does not fail a connection. This is a breaking change: Options in both crates gains the public tcp_nodelay field, so struct literals need it or ..Default::default(), and Client::new, serve and serve_tls now require the scheduler to implement SocketSetOption<TcpNoDelay>, which every Base scheduler backend provides. serve_connection leaves the options of a caller-accepted socket unchanged.
  • base-http1 incoming body reads are cancellation safe. Dropping a pending read, or cancelling its wait, loses no input, so a later read resumes at the same position. Previously any later read failed with "previous body read failed or was abandoned". A read that fails for another reason still fails every later read, now with "previous body read failed".