mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-08-08 09:42:06 +03:00
Move fizz specific part of the client in quic/fizz/client (#120)
Summary: This create a separate library for the fizz client. This allows complete separation of the fizz part of the client, and make it swapable for something else. Depends on https://github.com/facebookincubator/mvfst/issues/118 Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/120 Test Plan: Imported from GitHub, without a `Test Plan:` line. --- ## Proxygen Canary Traffic Canary: https://our.intern.facebook.com/intern/traffic/canary?fbid=528194164778784 * elb.prod.muc2c01 - binary - 2020-04-05 14:59 - https://fburl.com/dyndash/ywntlz9n * flb.prod.fceb2c02 - binary - 2020-04-05 14:59 - https://fburl.com/dyndash/ns1vzm1j * olb.prod.ratn0c01.p2 - binary - 2020-04-05 14:59 - https://fburl.com/dyndash/0vxebqop * slb.prod_regional.rnao0c00 - binary - 2020-04-05 14:59 - https://fburl.com/dyndash/a8syav0w * slb.regional.rvll0c01.p2 - binary - 2020-04-05 14:59 - https://fburl.com/dyndash/igneyshj --- Reviewed By: mjoras Differential Revision: D20769060 Pulled By: yangchi fbshipit-source-id: ad5d66c23b3a9723ad3f8c8091981df99339761e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
aa4229f6a6
commit
fb0b6b1cc4
@@ -50,7 +50,7 @@ quic_add_test(TARGET QuicPacketSchedulerTest
|
||||
QuicPacketSchedulerTest.cpp
|
||||
DEPENDS
|
||||
Folly::folly
|
||||
mvfst_client
|
||||
mvfst_fizz_client
|
||||
mvfst_codec_pktbuilder
|
||||
mvfst_transport
|
||||
mvfst_test_utils
|
||||
@@ -62,7 +62,7 @@ quic_add_test(TARGET IoBufQuicBatchTest
|
||||
IoBufQuicBatchTest.cpp
|
||||
DEPENDS
|
||||
Folly::folly
|
||||
mvfst_client
|
||||
mvfst_fizz_client
|
||||
mvfst_transport
|
||||
mvfst_state_machine
|
||||
)
|
||||
|
@@ -9,8 +9,8 @@
|
||||
#include <quic/api/IoBufQuicBatch.h>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <quic/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
#include <quic/client/state/ClientStateMachine.h>
|
||||
#include <quic/fizz/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
#include <quic/state/StateData.h>
|
||||
|
||||
constexpr const auto kNumLoops = 64;
|
||||
|
@@ -11,11 +11,11 @@
|
||||
#include <folly/portability/GTest.h>
|
||||
|
||||
#include <quic/api/test/Mocks.h>
|
||||
#include <quic/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
#include <quic/client/state/ClientStateMachine.h>
|
||||
#include <quic/codec/QuicPacketBuilder.h>
|
||||
#include <quic/codec/test/Mocks.h>
|
||||
#include <quic/common/test/TestUtils.h>
|
||||
#include <quic/fizz/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
#include <quic/server/state/ServerStateMachine.h>
|
||||
#include <quic/state/QuicStreamFunctions.h>
|
||||
|
||||
|
@@ -7,8 +7,6 @@ add_library(
|
||||
mvfst_client STATIC
|
||||
QuicClientTransport.cpp
|
||||
handshake/ClientHandshake.cpp
|
||||
handshake/FizzClientQuicHandshakeContext.cpp
|
||||
handshake/FizzClientHandshake.cpp
|
||||
state/ClientStateMachine.cpp
|
||||
)
|
||||
|
||||
@@ -28,7 +26,6 @@ add_dependencies(
|
||||
mvfst_client
|
||||
mvfst_bufutil
|
||||
mvfst_flowcontrol
|
||||
mvfst_fizz_handshake
|
||||
mvfst_happyeyeballs
|
||||
mvfst_loss
|
||||
mvfst_qlogger
|
||||
@@ -42,7 +39,6 @@ target_link_libraries(
|
||||
mvfst_client PUBLIC
|
||||
Folly::folly
|
||||
mvfst_flowcontrol
|
||||
mvfst_fizz_handshake
|
||||
mvfst_happyeyeballs
|
||||
mvfst_loss
|
||||
mvfst_qlogger
|
||||
@@ -68,6 +64,3 @@ install(
|
||||
EXPORT mvfst-exports
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
add_subdirectory(test)
|
||||
add_subdirectory(handshake/test)
|
||||
|
@@ -14,7 +14,6 @@
|
||||
#include <folly/io/async/AsyncUDPSocket.h>
|
||||
#include <folly/net/NetOps.h>
|
||||
#include <quic/api/QuicTransportBase.h>
|
||||
#include <quic/client/handshake/QuicPskCache.h>
|
||||
#include <quic/client/state/ClientStateMachine.h>
|
||||
#include <quic/common/BufUtil.h>
|
||||
|
||||
|
@@ -9,8 +9,8 @@
|
||||
#include <quic/client/handshake/ClientHandshake.h>
|
||||
|
||||
#include <quic/client/handshake/ClientTransportParametersExtension.h>
|
||||
#include <quic/client/handshake/QuicPskCache.h>
|
||||
#include <quic/client/state/ClientStateMachine.h>
|
||||
#include <quic/fizz/client/handshake/QuicPskCache.h>
|
||||
#include <quic/state/QuicStreamFunctions.h>
|
||||
|
||||
namespace quic {
|
||||
|
@@ -17,7 +17,6 @@ add_library(
|
||||
target_include_directories(
|
||||
mvfst_test_utils PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<BUILD_INTERFACE:${LIBFIZZ_INCLUDE_DIR}>
|
||||
${LIBGMOCK_INCLUDE_DIR}
|
||||
${LIBGTEST_INCLUDE_DIR}
|
||||
)
|
||||
@@ -30,10 +29,9 @@ target_compile_options(
|
||||
|
||||
add_dependencies(
|
||||
mvfst_test_utils
|
||||
mvfst_client
|
||||
mvfst_fizz_client
|
||||
mvfst_codec_pktbuilder
|
||||
mvfst_codec_types
|
||||
mvfst_fizz_handshake
|
||||
mvfst_server
|
||||
mvfst_state_machine
|
||||
mvfst_transport
|
||||
@@ -42,13 +40,11 @@ add_dependencies(
|
||||
target_link_libraries(
|
||||
mvfst_test_utils PUBLIC
|
||||
Folly::folly
|
||||
${LIBFIZZ_LIBRARY}
|
||||
${LIBGMOCK_LIBRARIES}
|
||||
${LIBGTEST_LIBRARIES}
|
||||
mvfst_client
|
||||
mvfst_fizz_client
|
||||
mvfst_codec_pktbuilder
|
||||
mvfst_codec_types
|
||||
mvfst_fizz_handshake
|
||||
mvfst_server
|
||||
mvfst_state_machine
|
||||
mvfst_transport
|
||||
@@ -64,12 +60,10 @@ quic_add_test(TARGET QuicCommonUtilTest SOURCES
|
||||
BufUtilTest.cpp
|
||||
DEPENDS
|
||||
Folly::folly
|
||||
${LIBFIZZ_LIBRARY}
|
||||
mvfst_bufutil
|
||||
mvfst_client
|
||||
mvfst_fizz_client
|
||||
mvfst_codec_pktbuilder
|
||||
mvfst_codec_types
|
||||
mvfst_fizz_handshake
|
||||
mvfst_looper
|
||||
mvfst_transport
|
||||
mvfst_server
|
||||
|
@@ -8,10 +8,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <quic/client/handshake/QuicPskCache.h>
|
||||
#include <quic/codec/QuicPacketBuilder.h>
|
||||
#include <quic/codec/Types.h>
|
||||
#include <quic/common/BufUtil.h>
|
||||
#include <quic/fizz/client/handshake/QuicPskCache.h>
|
||||
#include <quic/handshake/test/Mocks.h>
|
||||
#include <quic/logging/FileQLogger.h>
|
||||
#include <quic/server/state/ServerStateMachine.h>
|
||||
|
@@ -3,4 +3,5 @@
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
add_subdirectory(client)
|
||||
add_subdirectory(handshake)
|
||||
|
56
quic/fizz/client/CMakeLists.txt
Normal file
56
quic/fizz/client/CMakeLists.txt
Normal file
@@ -0,0 +1,56 @@
|
||||
# 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.
|
||||
|
||||
add_library(
|
||||
mvfst_fizz_client STATIC
|
||||
handshake/FizzClientQuicHandshakeContext.cpp
|
||||
handshake/FizzClientHandshake.cpp
|
||||
)
|
||||
|
||||
target_include_directories(
|
||||
mvfst_fizz_client PUBLIC
|
||||
$<BUILD_INTERFACE:${QUIC_FBCODE_ROOT}>
|
||||
$<INSTALL_INTERFACE:include/>
|
||||
)
|
||||
|
||||
target_compile_options(
|
||||
mvfst_fizz_client
|
||||
PRIVATE
|
||||
${_QUIC_COMMON_COMPILE_OPTIONS}
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
mvfst_fizz_client
|
||||
mvfst_client
|
||||
mvfst_fizz_handshake
|
||||
mvfst_codec_packet_number_cipher
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
mvfst_fizz_client PUBLIC
|
||||
mvfst_client
|
||||
mvfst_fizz_handshake
|
||||
mvfst_codec_packet_number_cipher
|
||||
)
|
||||
|
||||
file(
|
||||
GLOB_RECURSE QUIC_API_HEADERS_TOINSTALL
|
||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
*.h
|
||||
)
|
||||
list(FILTER QUIC_API_HEADERS_TOINSTALL EXCLUDE REGEX test/)
|
||||
foreach(header ${QUIC_API_HEADERS_TOINSTALL})
|
||||
get_filename_component(header_dir ${header} DIRECTORY)
|
||||
install(FILES ${header} DESTINATION include/quic/fizz/client/${header_dir})
|
||||
endforeach()
|
||||
|
||||
install(
|
||||
TARGETS mvfst_fizz_client
|
||||
EXPORT mvfst-exports
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
add_subdirectory(test)
|
||||
add_subdirectory(handshake/test)
|
@@ -6,12 +6,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <quic/client/handshake/FizzClientHandshake.h>
|
||||
#include <quic/fizz/client/handshake/FizzClientHandshake.h>
|
||||
|
||||
#include <quic/client/handshake/FizzClientExtensions.h>
|
||||
#include <quic/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
#include <quic/client/handshake/QuicPskCache.h>
|
||||
#include <quic/client/state/ClientStateMachine.h>
|
||||
#include <quic/fizz/client/handshake/FizzClientExtensions.h>
|
||||
#include <quic/fizz/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
#include <quic/fizz/client/handshake/QuicPskCache.h>
|
||||
#include <quic/fizz/handshake/FizzBridge.h>
|
||||
|
||||
#include <fizz/client/EarlyDataRejectionPolicy.h>
|
@@ -6,9 +6,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <quic/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
#include <quic/fizz/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
|
||||
#include <quic/client/handshake/FizzClientHandshake.h>
|
||||
#include <quic/fizz/client/handshake/FizzClientHandshake.h>
|
||||
|
||||
namespace quic {
|
||||
|
@@ -10,7 +10,7 @@
|
||||
|
||||
#include <quic/client/handshake/ClientHandshakeFactory.h>
|
||||
|
||||
#include <quic/client/handshake/QuicPskCache.h>
|
||||
#include <quic/fizz/client/handshake/QuicPskCache.h>
|
||||
|
||||
#include <fizz/client/FizzClientContext.h>
|
||||
#include <fizz/protocol/DefaultCertificateVerifier.h>
|
@@ -9,16 +9,12 @@ endif()
|
||||
|
||||
quic_add_test(TARGET ClientHandshakeTest
|
||||
SOURCES
|
||||
ClientHandshakeTest.cpp
|
||||
FizzClientHandshakeTest.cpp
|
||||
FizzClientExtensionsTest.cpp
|
||||
DEPENDS
|
||||
Folly::folly
|
||||
${LIBFIZZ_LIBRARY}
|
||||
mvfst_client
|
||||
mvfst_fizz_client
|
||||
mvfst_codec_types
|
||||
mvfst_constants
|
||||
mvfst_fizz_handshake
|
||||
mvfst_server
|
||||
mvfst_state_machine
|
||||
mvfst_test_utils
|
||||
)
|
@@ -8,8 +8,8 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <quic/client/handshake/FizzClientExtensions.h>
|
||||
#include <quic/common/test/TestUtils.h>
|
||||
#include <quic/fizz/client/handshake/FizzClientExtensions.h>
|
||||
|
||||
#include <fizz/protocol/test/TestMessages.h>
|
||||
|
@@ -24,11 +24,11 @@
|
||||
#include <folly/ssl/Init.h>
|
||||
|
||||
#include <quic/client/handshake/ClientTransportParametersExtension.h>
|
||||
#include <quic/client/handshake/FizzClientHandshake.h>
|
||||
#include <quic/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
#include <quic/client/handshake/test/MockQuicPskCache.h>
|
||||
#include <quic/client/state/ClientStateMachine.h>
|
||||
#include <quic/common/test/TestUtils.h>
|
||||
#include <quic/fizz/client/handshake/FizzClientHandshake.h>
|
||||
#include <quic/fizz/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
#include <quic/fizz/client/handshake/test/MockQuicPskCache.h>
|
||||
#include <quic/fizz/handshake/FizzBridge.h>
|
||||
#include <quic/fizz/handshake/QuicFizzFactory.h>
|
||||
#include <quic/state/QuicStreamFunctions.h>
|
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <quic/client/handshake/QuicPskCache.h>
|
||||
#include <quic/fizz/client/handshake/QuicPskCache.h>
|
||||
|
||||
#include <folly/Optional.h>
|
||||
#include <folly/portability/GMock.h>
|
@@ -13,11 +13,8 @@ quic_add_test(TARGET QuicClientTransportTest
|
||||
DEPENDS
|
||||
Folly::folly
|
||||
${LIBGMOCK_LIBRARIES}
|
||||
mvfst_bufutil
|
||||
mvfst_client
|
||||
mvfst_fizz_client
|
||||
mvfst_codec_types
|
||||
mvfst_fizz_handshake
|
||||
mvfst_server
|
||||
mvfst_test_utils
|
||||
mvfst_transport
|
||||
)
|
@@ -20,12 +20,12 @@
|
||||
#include <folly/io/SocketOptionMap.h>
|
||||
#include <folly/io/async/ScopedEventBaseThread.h>
|
||||
#include <folly/io/async/test/MockAsyncUDPSocket.h>
|
||||
#include <quic/client/handshake/FizzClientHandshake.h>
|
||||
#include <quic/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
#include <quic/client/handshake/test/MockQuicPskCache.h>
|
||||
#include <quic/codec/DefaultConnectionIdAlgo.h>
|
||||
#include <quic/common/test/TestUtils.h>
|
||||
#include <quic/congestion_control/CongestionControllerFactory.h>
|
||||
#include <quic/fizz/client/handshake/FizzClientHandshake.h>
|
||||
#include <quic/fizz/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
#include <quic/fizz/client/handshake/test/MockQuicPskCache.h>
|
||||
#include <quic/fizz/handshake/FizzCryptoFactory.h>
|
||||
#include <quic/handshake/TransportParameters.h>
|
||||
#include <quic/handshake/test/Mocks.h>
|
@@ -12,10 +12,10 @@
|
||||
#include <folly/io/async/test/MockAsyncUDPSocket.h>
|
||||
#include <folly/io/async/test/MockTimeoutManager.h>
|
||||
#include <quic/api/QuicTransportFunctions.h>
|
||||
#include <quic/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
#include <quic/client/state/ClientStateMachine.h>
|
||||
#include <quic/codec/DefaultConnectionIdAlgo.h>
|
||||
#include <quic/common/test/TestUtils.h>
|
||||
#include <quic/fizz/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
#include <quic/logging/test/Mocks.h>
|
||||
#include <quic/loss/QuicLossFunctions.h>
|
||||
#include <quic/server/state/ServerStateMachine.h>
|
||||
|
@@ -18,9 +18,9 @@
|
||||
|
||||
#include <quic/api/QuicSocket.h>
|
||||
#include <quic/client/QuicClientTransport.h>
|
||||
#include <quic/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
#include <quic/common/BufUtil.h>
|
||||
#include <quic/common/test/TestUtils.h>
|
||||
#include <quic/fizz/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
|
||||
namespace quic {
|
||||
namespace samples {
|
||||
|
@@ -24,8 +24,8 @@
|
||||
#include <folly/ssl/Init.h>
|
||||
|
||||
#include <quic/QuicConstants.h>
|
||||
#include <quic/client/handshake/FizzClientExtensions.h>
|
||||
#include <quic/common/test/TestUtils.h>
|
||||
#include <quic/fizz/client/handshake/FizzClientExtensions.h>
|
||||
#include <quic/fizz/handshake/FizzBridge.h>
|
||||
#include <quic/fizz/handshake/QuicFizzFactory.h>
|
||||
#include <quic/handshake/HandshakeLayer.h>
|
||||
|
@@ -12,9 +12,9 @@
|
||||
#include <quic/state/QuicStreamFunctions.h>
|
||||
#include <quic/state/QuicStreamUtilities.h>
|
||||
|
||||
#include <quic/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
#include <quic/client/state/ClientStateMachine.h>
|
||||
#include <quic/common/test/TestUtils.h>
|
||||
#include <quic/fizz/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
#include <quic/server/state/ServerStateMachine.h>
|
||||
|
||||
using namespace folly;
|
||||
|
@@ -15,9 +15,9 @@
|
||||
#include <folly/stats/Histogram.h>
|
||||
|
||||
#include <quic/client/QuicClientTransport.h>
|
||||
#include <quic/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
#include <quic/common/test/TestUtils.h>
|
||||
#include <quic/congestion_control/CongestionControllerFactory.h>
|
||||
#include <quic/fizz/client/handshake/FizzClientQuicHandshakeContext.h>
|
||||
#include <quic/server/QuicServer.h>
|
||||
#include <quic/server/QuicServerTransport.h>
|
||||
#include <quic/server/QuicSharedUDPSocketFactory.h>
|
||||
|
Reference in New Issue
Block a user