1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-11-07 22:46:22 +03:00
Commit Graph

16 Commits

Author SHA1 Message Date
Alan Frindell
e1675e2641 Fix streamWriteOffset's in QuicStreamAsyncTransport
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
2024-08-01 09:13:47 -07:00
Matt Joras
aefc9e369b Introduce quic::Optional
Summary:
The idea here is to make it so we can swap out the type we are using for optionality. In the near term we are going to try swapping towards one that more aggressively tries to save size.

For now there is no functional change and this is just a big aliasing diff.

Reviewed By: sharmafb

Differential Revision: D57633896

fbshipit-source-id: 6eae5953d47395b390016e59cf9d639f3b6c8cfe
2024-06-11 11:02:02 -07:00
Joseph Beshay
ead139adef Move all mvfst use-cases to the new Eventbase, Timer, and Socket interfaces
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
2023-12-14 00:24:12 -08:00
Konstantin Tsoy
08aba67f8b Rename a few headers
Summary:
And add comments to the new events classes.

Old naming:
```
Events.h/cpp
  -> EventsMobile.h/cpp
```

New naming:
```
QuicEventBase.h/cpp
  -> QuicLibevEventBase.h/cpp
```

Reviewed By: hanidamlaj, mjoras

Differential Revision: D47140799

fbshipit-source-id: 6a25e76c454b0f8468d830feb4dfd99c1576c8b8
2023-07-13 18:39:45 -07:00
Konstantin Tsoy
fdedffa855 QuicEventBase
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
2023-05-23 14:16:15 -07:00
Konstantin Tsoy
cecc1ba279 Introduce QuicError struct
Summary: Instead of using std::pair everywhere

Reviewed By: mjoras

Differential Revision: D34146686

fbshipit-source-id: dfe48f43775de868aba06a5b9b5a004e5793bdbb
2022-02-14 16:00:21 -08:00
Hani Damlaj
00e67c1bf9 mvfst License Header Update
Reviewed By: lnicco

Differential Revision: D33587012

fbshipit-source-id: 972eb440f0156c9c04aa6e8787561b18295c1a97
2022-01-18 13:56:12 -08:00
Hani Damlaj
2660a288b3 Update Company Name
Summary: - as title

Reviewed By: lnicco

Differential Revision: D33513410

fbshipit-source-id: 282b6f512cf83b9abb7990402661135b658f7bd1
2022-01-13 12:07:48 -08:00
Andres Suarez
05d07cbfd0 Apply clang-format update fixes
Reviewed By: igorsugak

Differential Revision: D25849213

fbshipit-source-id: a2a538230e769b2c328ae3dd0a19dfbfd693fe3b
2021-01-09 15:39:52 -08:00
Andrii Vasylevskyi
7204c8c46e QUIC client and server AsyncTransport wrappers
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
2020-11-30 13:14:24 -08:00
Andrii Vasylevskyi
c1c343d86b Reintroduce QuicStreamAsyncTransport
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
2020-06-11 05:21:59 -07:00
Luca Niccolini
ba1ce44645 remove unused header
Summary: ^

Reviewed By: sharma95

Differential Revision: D15226868

fbshipit-source-id: c8090ed93e2d0d9c9092fcdfdc34698ff824c334
2019-05-06 15:38:46 -07:00
Luca Niccolini
3f9f6d86fe fix application error code
Summary:
```
s/quic::ApplicationErrorCode::STOPPING/GenericApplicationErrorCode::UNKNOWN/g
```

Reviewed By: yangchi

Differential Revision: D15213975

fbshipit-source-id: 60707998abf4fabcf2d53e2c43c2101952e9fa8f
2019-05-06 15:18:40 -07:00
Alan Frindell
a122063d22 Add helper to send a reset from a readError
Summary: The previous diff removed automatically sending a rst stream when receiving a reset stream.  This adds a helper to do that from the application layer.

Reviewed By: mjoras, pkir

Differential Revision: D15208997

fbshipit-source-id: b8d3898e85537e97df61cc66854299698a48c825
2019-05-06 14:05:32 -07:00
udippant
79032c7b9b fbshipit-source-id: f498ac5e677b2931d937ba78edd4373ba04dca2a 2019-04-25 21:33:43 -07:00
udippant
50d4939e9e Initial commit of mvfst 2019-04-22 23:42:46 -07:00