From 65c8e63208d73de143ae4e5d592ff4b32e548fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20S=C3=A9chet?= Date: Wed, 15 Jan 2020 10:16:21 -0800 Subject: [PATCH] Extract CachedServerTransportParameters in its own file (#84) Summary: QuicCachedPsk depends on fizz, CachedServerTransportParameters doesn't, so this is one step further toward separating fizz specific part of the code from the rest. Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/84 Reviewed By: sharma95 Differential Revision: D19386613 Pulled By: udippant fbshipit-source-id: 06bc21108aa7880e1f1820cb8a4c6dbee392c9c4 --- .../CachedServerTransportParameters.h | 29 +++++++++++++++++++ quic/client/handshake/ClientHandshake.h | 1 - quic/client/handshake/QuicPskCache.h | 15 +--------- quic/client/state/ClientStateMachine.cpp | 1 - quic/client/state/ClientStateMachine.h | 1 + 5 files changed, 31 insertions(+), 16 deletions(-) create mode 100644 quic/client/handshake/CachedServerTransportParameters.h diff --git a/quic/client/handshake/CachedServerTransportParameters.h b/quic/client/handshake/CachedServerTransportParameters.h new file mode 100644 index 000000000..11b6ce368 --- /dev/null +++ b/quic/client/handshake/CachedServerTransportParameters.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + +#pragma once + +#include + +#include + +namespace quic { + +struct CachedServerTransportParameters { + QuicVersion negotiatedVersion; + uint64_t idleTimeout; + uint64_t maxRecvPacketSize; + uint64_t initialMaxData; + uint64_t initialMaxStreamDataBidiLocal; + uint64_t initialMaxStreamDataBidiRemote; + uint64_t initialMaxStreamDataUni; + uint64_t initialMaxStreamsBidi; + uint64_t initialMaxStreamsUni; +}; + +} // namespace quic diff --git a/quic/client/handshake/ClientHandshake.h b/quic/client/handshake/ClientHandshake.h index 45527bae6..7ab5d8783 100644 --- a/quic/client/handshake/ClientHandshake.h +++ b/quic/client/handshake/ClientHandshake.h @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/quic/client/handshake/QuicPskCache.h b/quic/client/handshake/QuicPskCache.h index bee2fb697..a2c6da700 100644 --- a/quic/client/handshake/QuicPskCache.h +++ b/quic/client/handshake/QuicPskCache.h @@ -8,28 +8,15 @@ #pragma once -#include +#include #include #include -#include #include namespace quic { -struct CachedServerTransportParameters { - QuicVersion negotiatedVersion; - uint64_t idleTimeout; - uint64_t maxRecvPacketSize; - uint64_t initialMaxData; - uint64_t initialMaxStreamDataBidiLocal; - uint64_t initialMaxStreamDataBidiRemote; - uint64_t initialMaxStreamDataUni; - uint64_t initialMaxStreamsBidi; - uint64_t initialMaxStreamsUni; -}; - struct QuicCachedPsk { fizz::client::CachedPsk cachedPsk; CachedServerTransportParameters transportParams; diff --git a/quic/client/state/ClientStateMachine.cpp b/quic/client/state/ClientStateMachine.cpp index 794d726e1..e83bc59b7 100644 --- a/quic/client/state/ClientStateMachine.cpp +++ b/quic/client/state/ClientStateMachine.cpp @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/quic/client/state/ClientStateMachine.h b/quic/client/state/ClientStateMachine.h index 15a6369f7..eb03a6552 100644 --- a/quic/client/state/ClientStateMachine.h +++ b/quic/client/state/ClientStateMachine.h @@ -9,6 +9,7 @@ #pragma once #include +#include #include #include #include