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

Side by Side Diff: webrtc/p2p/base/stunrequest.h

Issue 1737493004: Keep on sending stun binding requests on zero-cost networks. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Change back to uint32_t timestamp Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « webrtc/p2p/base/stunport_unittest.cc ('k') | webrtc/p2p/base/stunrequest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 21 matching lines...) Expand all
32 32
33 // Starts sending the given request (perhaps after a delay). 33 // Starts sending the given request (perhaps after a delay).
34 void Send(StunRequest* request); 34 void Send(StunRequest* request);
35 void SendDelayed(StunRequest* request, int delay); 35 void SendDelayed(StunRequest* request, int delay);
36 36
37 // If |msg_type| is kAllRequests, sends all pending requests right away. 37 // If |msg_type| is kAllRequests, sends all pending requests right away.
38 // Otherwise, sends those that have a matching type right away. 38 // Otherwise, sends those that have a matching type right away.
39 // Only for testing. 39 // Only for testing.
40 void Flush(int msg_type); 40 void Flush(int msg_type);
41 41
42 // Returns true if at least one request with |msg_type| is scheduled for
43 // transmission. For testing only.
44 bool HasRequest(int msg_type);
45
42 // Removes a stun request that was added previously. This will happen 46 // Removes a stun request that was added previously. This will happen
43 // automatically when a request succeeds, fails, or times out. 47 // automatically when a request succeeds, fails, or times out.
44 void Remove(StunRequest* request); 48 void Remove(StunRequest* request);
45 49
46 // Removes all stun requests that were added previously. 50 // Removes all stun requests that were added previously.
47 void Clear(); 51 void Clear();
48 52
49 // Determines whether the given message is a response to one of the 53 // Determines whether the given message is a response to one of the
50 // outstanding requests, and if so, processes it appropriately. 54 // outstanding requests, and if so, processes it appropriately.
51 bool CheckResponse(StunMessage* msg); 55 bool CheckResponse(StunMessage* msg);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 StunRequestManager* manager_; 130 StunRequestManager* manager_;
127 StunMessage* msg_; 131 StunMessage* msg_;
128 uint32_t tstamp_; 132 uint32_t tstamp_;
129 133
130 friend class StunRequestManager; 134 friend class StunRequestManager;
131 }; 135 };
132 136
133 } // namespace cricket 137 } // namespace cricket
134 138
135 #endif // WEBRTC_P2P_BASE_STUNREQUEST_H_ 139 #endif // WEBRTC_P2P_BASE_STUNREQUEST_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/stunport_unittest.cc ('k') | webrtc/p2p/base/stunrequest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698