1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-08-08 09:42:06 +03:00

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
This commit is contained in:
Andrii Vasylevskyi
2020-11-30 13:13:19 -08:00
committed by Facebook GitHub Bot
parent e16fb7ffdd
commit 7204c8c46e
14 changed files with 810 additions and 118 deletions

View File

@@ -135,6 +135,10 @@ class QuicStreamAsyncTransportTest : public Test {
}
void TearDown() override {
if (serverAsyncWrapper_) {
serverAsyncWrapper_->getEventBase()->runInEventBaseThreadAndWait(
[&]() { serverAsyncWrapper_.reset(); });
}
server_->shutdown();
server_ = nullptr;
clientEvb_.runInEventBaseThreadAndWait([&] {