aboutsummaryrefslogtreecommitdiff
path: root/webrtc/test/fake_network_pipe.h
diff options
context:
space:
mode:
authorhenrik.lundin@webrtc.org <henrik.lundin@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-02-26 13:34:52 +0000
committerhenrik.lundin@webrtc.org <henrik.lundin@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-02-26 13:34:52 +0000
commitc0e9aebe8f11e8622dc146406d8263f4bb436008 (patch)
tree03e1b605542fb6aa2084d4f7f632c434a2840bd5 /webrtc/test/fake_network_pipe.h
parenteaadecaf9878dce0560a77056b7b4481772df373 (diff)
downloadwebrtc-c0e9aebe8f11e8622dc146406d8263f4bb436008.tar.gz
Add SetConfig method to FakeNetworkPipe and to DirectTransport
This method allow the user to change the network configuration during run-time. This is useful when testing how components react to changing bandwidth. BUG=2636 R=mflodman@webrtc.org Review URL: https://webrtc-codereview.appspot.com/9049004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5612 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'webrtc/test/fake_network_pipe.h')
-rw-r--r--webrtc/test/fake_network_pipe.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/webrtc/test/fake_network_pipe.h b/webrtc/test/fake_network_pipe.h
index e75045701d..3dcda2982a 100644
--- a/webrtc/test/fake_network_pipe.h
+++ b/webrtc/test/fake_network_pipe.h
@@ -57,6 +57,9 @@ class FakeNetworkPipe {
// Must not be called in parallel with SendPacket or Process.
void SetReceiver(PacketReceiver* receiver);
+ // Sets a new configuration. This won't affect packets already in the pipe.
+ void SetConfig(const FakeNetworkPipe::Config& config);
+
// Sends a new packet to the link.
void SendPacket(const uint8_t* packet, size_t packet_length);