Index: webrtc/base/virtualsocketserver.h |
diff --git a/webrtc/base/virtualsocketserver.h b/webrtc/base/virtualsocketserver.h |
index 565222bfd2453357f6c22204446b21a92b5df93d..c81fceca87fbc0c932abdf62d016f910860ceb62 100644 |
--- a/webrtc/base/virtualsocketserver.h |
+++ b/webrtc/base/virtualsocketserver.h |
@@ -79,8 +79,15 @@ class VirtualSocketServer : public SocketServer, public sigslot::has_slots<> { |
} |
// If the (transit) delay parameters are modified, this method should be |
- // called to recompute the new distribution. |
+ // called to recompute the new distribution for the transit delay. |
+ // If |delay_dist_ipv6_| is set, that will be used for the delay distribution |
+ // of IPv6 sockets. |
void UpdateDelayDistribution(); |
+ // Computes a new delay distribution for IPv6 sockets using the current |
+ // delay parameters. If this was not called to create a delay distribution |
+ // for IPv6 sockets, IPv6 sockets use the same delay distribution as |
+ // |delay_dist_| set by UpdateDelayDistribution(). |
+ void UpdateDelayDistributionForIPv6(); |
// Controls the (uniform) probability that any sent packet is dropped. This |
// is separate from calculations to drop based on queue size. |
@@ -195,7 +202,7 @@ class VirtualSocketServer : public SocketServer, public sigslot::has_slots<> { |
uint32_t SendDelay(uint32_t size); |
// Returns a random transit delay chosen from the appropriate distribution. |
- uint32_t GetRandomTransitDelay(); |
+ uint32_t GetRandomTransitDelay(Socket* socket); |
// Basic operations on functions. Those that return a function also take |
// ownership of the function given (and hence, may modify or delete it). |
@@ -260,7 +267,9 @@ class VirtualSocketServer : public SocketServer, public sigslot::has_slots<> { |
uint32_t delay_mean_; |
uint32_t delay_stddev_; |
uint32_t delay_samples_; |
- Function* delay_dist_; |
+ std::unique_ptr<Function> delay_dist_; |
+ std::unique_ptr<Function> delay_dist_ipv6_; |
+ |
CriticalSection delay_crit_; |
double drop_prob_; |