| OLD | NEW |
| 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 Loading... |
| 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 Exist(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 Loading... |
| 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_ |
| OLD | NEW |