/* * Copyright (c) 2019 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/
class RandomWalkCrossTraffic final : public CrossTrafficGenerator { public:
RandomWalkCrossTraffic(RandomWalkConfig config,
CrossTrafficRoute* traffic_route);
~RandomWalkCrossTraffic();
class PulsedPeaksCrossTraffic final : public CrossTrafficGenerator { public:
PulsedPeaksCrossTraffic(PulsedPeaksConfig config,
CrossTrafficRoute* traffic_route);
~PulsedPeaksCrossTraffic();
class TcpMessageRouteImpl final : public TcpMessageRoute { public:
TcpMessageRouteImpl(Clock* clock,
TaskQueueBase* task_queue,
EmulatedRoute* send_route,
EmulatedRoute* ret_route);
// Sends a TCP message of the given `size` over the route, `on_received` is // called when the message has been delivered. Note that the connection // parameters are reset iff there's no currently pending message on the route. void SendMessage(size_t size, std::function<void()> on_received) override;
private: // Represents a message sent over the route. When all fragments has been // delivered, the message is considered delivered and the handler is // triggered. This only happen once. struct Message {
std::function<void()> handler;
std::set<int> pending_fragment_ids;
}; // Represents a piece of a message that fit into a TCP packet. struct MessageFragment { int fragment_id;
size_t size;
}; // Represents a packet sent on the wire. struct TcpPacket { int sequence_number;
Timestamp send_time = Timestamp::MinusInfinity();
MessageFragment fragment;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.