Skip to content

Commit

Permalink
Move core functionality to QuicTransportBaseLite [23/n][take 2]
Browse files Browse the repository at this point in the history
Summary: This is pretty much the same as D65605100, which was reverted due to a cycle detection ([link](https://fb.workplace.com/groups/mobile.sheriffs/posts/27342968238658432/?comment_id=27343054638649792)). It turns out that the issue was that I didn't run `xplat/cross_plat_devx/somerge_maps/compute_merge_maps.py`.

Reviewed By: jbeshay

Differential Revision: D65761171

fbshipit-source-id: fc852ec13e54ea6ea45b4fda6b4556a78f38fc7f
  • Loading branch information
Aman Sharma authored and facebook-github-bot committed Nov 12, 2024
1 parent 66ac0ed commit c10bf16
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 23 deletions.
64 changes: 44 additions & 20 deletions quic/api/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -45,56 +45,42 @@ mvfst_cpp_library(
mvfst_cpp_library(
name = "transport",
srcs = [
"IoBufQuicBatch.cpp",
"QuicPacketScheduler.cpp",
"QuicTransportBase.cpp",
"QuicTransportBaseLite.cpp",
"QuicTransportFunctions.cpp",
],
headers = [
"IoBufQuicBatch.h",
"QuicPacketScheduler.h",
"QuicSocket.h",
"QuicSocketLite.h",
"QuicTransportBase.h",
"QuicTransportBaseLite.h",
"QuicTransportFunctions.h",
],
deps = [
":loop_detector_callback",
":quic_batch_writer",
"//folly:chrono",
"//folly:scope_guard",
"//folly/tracing:static_tracepoint",
"//quic/common:buf_accessor",
"//quic/common:socket_util",
"//quic/common:time_util",
"//quic/congestion_control:ecn_l4s_tracker",
"//quic/congestion_control:pacer",
"//quic/happyeyeballs:happyeyeballs",
"//quic/flowcontrol:flow_control",
"//quic/logging:qlogger_constants",
"//quic/loss:loss",
"//quic/state:ack_frequency_functions",
"//quic/state:ack_handler",
"//quic/state:pacing_functions",
"//quic/state:simple_frame_functions",
"//quic/state:state_functions",
"//quic/state:stream_functions",
"//quic/state/stream:stream",
],
exported_deps = [
":quic_batch_writer",
":quic_callbacks",
":transport_helpers",
"//folly:exception_wrapper",
"//folly:expected",
"//folly:maybe_managed_ptr",
"//folly:portability",
"//folly/io:iobuf",
"//folly/io/async:async_transport_certificate",
"//folly/lang:assume",
"//quic:constants",
"//quic:exception",
"//quic/client:state_and_handshake",
"//quic/codec:codec",
"//quic/codec:pktbuilder",
"//quic/codec:pktrebuilder",
"//quic/codec:types",
"//quic/common:looper",
"//quic/common:network_data",
Expand All @@ -108,7 +94,6 @@ mvfst_cpp_library(
"//quic/congestion_control:copa",
"//quic/congestion_control:cubic",
"//quic/congestion_control:newreno",
"//quic/flowcontrol:flow_control",
"//quic/handshake:transport_parameters",
"//quic/observer:socket_observer_container",
"//quic/observer:socket_observer_types",
Expand All @@ -117,6 +102,45 @@ mvfst_cpp_library(
"//quic/state:quic_state_machine",
"//quic/state:quic_stream_utilities",
"//quic/state:retransmission_policy",
],
)

mvfst_cpp_library(
name = "transport_helpers",
srcs = [
"IoBufQuicBatch.cpp",
"QuicPacketScheduler.cpp",
"QuicTransportFunctions.cpp",
],
headers = [
"IoBufQuicBatch.h",
"QuicPacketScheduler.h",
"QuicTransportFunctions.h",
],
deps = [
"//folly/tracing:static_tracepoint",
"//quic/common:buf_accessor",
"//quic/common:socket_util",
"//quic/happyeyeballs:happyeyeballs",
"//quic/state:ack_frequency_functions",
"//quic/state:ack_handler",
"//quic/state:simple_frame_functions",
],
exported_deps = [
":quic_batch_writer",
"//folly:expected",
"//folly/lang:assume",
"//quic:constants",
"//quic:exception",
"//quic/client:state_and_handshake",
"//quic/codec:codec",
"//quic/codec:pktbuilder",
"//quic/codec:pktrebuilder",
"//quic/codec:types",
"//quic/common/udpsocket:quic_async_udp_socket",
"//quic/flowcontrol:flow_control",
"//quic/handshake:transport_parameters",
"//quic/state:quic_state_machine",
"//quic/state:state_functions",
"//quic/state:stats_callback",
"//quic/state:stream_functions",
Expand Down
2 changes: 1 addition & 1 deletion quic/api/QuicTransportBaseLite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ bool QuicTransportBaseLite::isBidirectionalStream(StreamId stream) noexcept {
return quic::isBidirectionalStream(stream);
}

QuicSocket::WriteResult QuicTransportBaseLite::writeChain(
QuicSocketLite::WriteResult QuicTransportBaseLite::writeChain(
StreamId id,
Buf data,
bool eof,
Expand Down
1 change: 0 additions & 1 deletion quic/api/QuicTransportFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <quic/QuicException.h>
#include <quic/api/IoBufQuicBatch.h>
#include <quic/api/QuicPacketScheduler.h>
#include <quic/api/QuicSocket.h>
#include <quic/common/udpsocket/QuicAsyncUDPSocket.h>
#include <quic/handshake/TransportParameters.h>
#include <quic/state/StateData.h>
Expand Down
4 changes: 3 additions & 1 deletion quic/somerge_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Generated by xplat/cross_plat_devx/somerge_maps/compute_merge_maps.py
@generated SignedSource<<5001a712c11a20f56aad59bc84c56359>>
@generated SignedSource<<80ffdf62b2f4f6fb1c36eb1882d65531>>
"""

# Entry Points:
Expand Down Expand Up @@ -33,6 +33,8 @@ QUIC_NATIVE_LIBRARY_MERGE_MAP = [
"fbsource//xplat/quic/api:quic_callbacksAndroidAndroid",
"fbsource//xplat/quic/api:transportAndroid",
"fbsource//xplat/quic/api:transportAndroidAndroid",
"fbsource//xplat/quic/api:transport_helpersAndroid",
"fbsource//xplat/quic/api:transport_helpersAndroidAndroid",
"fbsource//xplat/quic/client:cached_server_tpAndroid",
"fbsource//xplat/quic/client:cached_server_tpAndroidAndroid",
"fbsource//xplat/quic/client:clientAndroid",
Expand Down

0 comments on commit c10bf16

Please sign in to comment.