Use QuicClientSocketManager to pick source port for Hyperloop client. Notes: 1. QuicClientSocketManager is instantiated per thread. 2. Each QuicClientSocketManager claims a unique set of local ports. 3. When a source port is needed, QuicClientSocketManager will look up the ones it claimed first. Otherwise, it will get one by bind/connect on a SO_REUSEPORT socket. Protected by FLAGS_gfe2_restart_flag_gfe_quic_use_backend_port_picker. PiperOrigin-RevId: 978746691
diff --git a/quiche/quic/core/quic_udp_socket.h b/quiche/quic/core/quic_udp_socket.h index 2f4e5c7..6c237c0 100644 --- a/quiche/quic/core/quic_udp_socket.h +++ b/quiche/quic/core/quic_udp_socket.h
@@ -292,10 +292,11 @@ size_t packet_buffer_len, const QuicUdpPacketInfo& packet_info); - protected: bool SetupSocket(QuicUdpSocketFd fd, int address_family, int receive_buffer_size, int send_buffer_size, bool ipv6_only); + + protected: bool EnableReceiveSelfIpAddressForV4(QuicUdpSocketFd fd); bool EnableReceiveSelfIpAddressForV6(QuicUdpSocketFd fd); };
diff --git a/quiche/quic/tools/quic_client_default_network_helper.h b/quiche/quic/tools/quic_client_default_network_helper.h index ecf9ced..83cd239 100644 --- a/quiche/quic/tools/quic_client_default_network_helper.h +++ b/quiche/quic/tools/quic_client_default_network_helper.h
@@ -139,6 +139,10 @@ bool RegisterSocket(SocketFd fd, QuicSocketEventMask event_mask, QuicSocketAddress client_address); + void set_overflow_supported(bool overflow_supported) { + overflow_supported_ = overflow_supported; + } + private: // Listens for events on the client socket. QuicEventLoop* event_loop_;