Index: webrtc/p2p/base/port.h |
diff --git a/webrtc/p2p/base/port.h b/webrtc/p2p/base/port.h |
index 06efd2d3c235c4e976fda6f610c187741ac7542f..dfde2157e8af66e142f92872693bb586a58c7097 100644 |
--- a/webrtc/p2p/base/port.h |
+++ b/webrtc/p2p/base/port.h |
@@ -178,7 +178,7 @@ class Port : public PortInterface, public rtc::MessageHandler, |
} |
// Identifies the generation that this port was created in. |
- uint32_t generation() { return generation_; } |
+ uint32_t generation() const { return generation_; } |
void set_generation(uint32_t generation) { generation_ = generation; } |
const std::string username_fragment() const; |
@@ -502,6 +502,13 @@ class Connection : public CandidatePairInterface, |
// side stops using it as well. |
bool pruned() const { return pruned_; } |
void Prune(); |
+ // Called when the state is WRITE_TIMEOUT but need to be reset and un-pruned. |
+ void ResetWriteStateAndUnprune() { |
+ write_state_ = STATE_WRITE_INIT; |
+ if (pruned_) { |
+ pruned_ = false; |
+ } |
+ } |
bool use_candidate_attr() const { return use_candidate_attr_; } |
void set_use_candidate_attr(bool enable); |
@@ -542,6 +549,8 @@ class Connection : public CandidatePairInterface, |
// Handles the binding request; sends a response if this is a valid request. |
void HandleBindingRequest(IceMessage* msg); |
+ int64_t last_data_received() const { return last_data_received_; } |
+ |
// Debugging description of this connection |
std::string ToDebugId() const; |
std::string ToString() const; |