Summary: Now we track the write offset from QSAT's PoV, rather than querying the QuicSocket for QUIC's perspective. Previously, the write callbacks were firing too early, leading to problems.
Reviewed By: mjoras
Differential Revision: D60305967
fbshipit-source-id: ea0470e1d2654848164f4edcfbd5a72a8f33d064
Summary:
This is the major transition that updates mvfst code to use the new interfaces. The new Folly implementations of the interfaces maintain all the existing behavior of folly types so this should not introduce any functional change. The core changes are:
- Update the BatchWriters to use the new interfaces.
- Update the FunctionLooper to use the new interfaces.
- Change QuicServerTransport to take the folly types and wrap them in the new types for use in the QuicTransportBase.
The rest of the diff is for updating all the existing uses of the QuicTrasnport to initialize the necessary types and pass them to the QUIC transport instead of directly passing folly types.
Reviewed By: mjoras
Differential Revision: D51413481
fbshipit-source-id: 5ed607e12b9a52b96148ad9b4f8f43899655d936
Summary:
Create and use an actual wrapper around folly::EventBase.
Later an interface will be added that the wrapper will be implementing.
Reviewed By: jbeshay
Differential Revision: D45822401
fbshipit-source-id: 3b33f796c31043ec2881b753a9b60943bdf91f1d
Summary:
- folly::AsyncTransport::setReadCb(nullptr) is semantically equivalent to QuicSocket::pauseRead(), rather than QuicSocket::setReadCallback(nullptr) which permanently uninstalls the callback
- refactored unit tests a tiny bit
Reviewed By: mjoras
Differential Revision: D45366235
fbshipit-source-id: 76e840ece40741fce8e6cb41b130a524d14d9e55
Summary:
A wrapper for `folly::EventBase` to be used throughout mvfst library.
Right now it's simply a `using QuicEventBase = folly::EventBase` in the new `quic/common/Events.h`, so no functional changes.
The change to the wrapper usage is constrained to QuicTransportBase and the code around for now - basically excluding top level client and server code that is still using `folly::EventBase` directly.
Subsequent changes will introduce a proper wrapper implementation getting rid of `using QuicEventBase = folly::EventBase` in the new class.
Reviewed By: mjoras
Differential Revision: D44757549
fbshipit-source-id: 5a0dd120ec319a474452eaec64a27f660144acdf
Summary:
quic interop has been broken for mvfst client against server implementations that expect a stream FIN at the end of the request. This only affects hq-interop (http/0.9 over QUIC).
This fixes that by:
- Ensuring H1Codec sends an EOF at the end of the request when required. This is only used for H1QUpstreamSession.
- QuicStreamAsyncTransport tolerating write errors after the EOF has been delivered and the underlying stream is closed.
Reviewed By: mjoras
Differential Revision: D42860459
fbshipit-source-id: 65eb148cf40e677ac5a005eaa2d91a742ed8cbd8
Summary:
I was using this for hq-interop testing, and I discovered a couple bugs.
1) readCb_ may not be set initially, so only attempt an initial read if it's non-null
2) When this transport closes, we shouldn't close the underlying QUIC socket. Instead we should attempt to write a FIN (if we haven't already). If that doesn't immediately succeed (perhaps queued writes are blocked on flow control), send a reset.
Reviewed By: kvtsoy
Differential Revision: D40741000
fbshipit-source-id: f3f925b884ae30feac0d86cbca13084248566099
Summary: this param is passed to transport then ignored
Reviewed By: avasylev
Differential Revision: D26133327
fbshipit-source-id: 459dd0132185513215ba034f213d4137d7b56ba1
Summary:
Helper classes for easy experimentation with QUIC in existing code using folly::AsyncSockets, using single QUIC bidi stream.
1) QuicStreamAsyncTransport buffers writes/read callback assignment until stream id is assigned. This similar to AsyncSocket that handles connect() internally and allows consumers to read/write right away after instance creation.
2) Quic(Client|Server)AsyncTransport handle connection level callbacks and update stream id on corresponding stream event
3) QuicAsyncTransportAcceptor and QuicAsyncTransportServer handle wangle::ManagedConnections, which are commonly used with folly::AsyncServerSockets
Reviewed By: yangchi
Differential Revision: D24656620
fbshipit-source-id: 75f9eb66c6cc8b7b1b974912d760c8aae5a5809f
Summary: Interact with a QUIC stream with the folly transport api you are used to
Reviewed By: mjoras
Differential Revision: D19541969
fbshipit-source-id: 36b8273095638e1e0136502925262c0eab264aa1