Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1148)

Unified Diff: net/quic/test_tools/simulator/switch.h

Issue 2391723003: Add an interface to access individual queues on the switch (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/simulator/switch.h
diff --git a/net/quic/test_tools/simulator/switch.h b/net/quic/test_tools/simulator/switch.h
index 29d42dc64b2de7f3d29de3656b39afa2bff6bd37..c6177c5e41499cc81b0ad947a8582b91c32d3035 100644
--- a/net/quic/test_tools/simulator/switch.h
+++ b/net/quic/test_tools/simulator/switch.h
@@ -31,6 +31,10 @@ class Switch {
return &ports_[port_number - 1];
}
+ inline const Queue* port_queue(SwitchPortNumber port_number) {
+ return ports_[port_number - 1].queue();
+ }
+
private:
class Port : public Endpoint, public UnconstrainedPortInterface {
public:
@@ -52,7 +56,8 @@ class Switch {
void Act() override;
- inline bool connected() { return connected_; }
+ inline bool connected() const { return connected_; }
+ inline const Queue* queue() const { return &queue_; }
private:
Switch* parent_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698