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

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

Issue 1458013004: Make it extra safe when deleting a turn entry. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | webrtc/p2p/base/turnport.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 2012 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2012 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 bool ScheduleRefresh(int lifetime); 212 bool ScheduleRefresh(int lifetime);
213 void SendRequest(StunRequest* request, int delay); 213 void SendRequest(StunRequest* request, int delay);
214 int Send(const void* data, size_t size, 214 int Send(const void* data, size_t size,
215 const rtc::PacketOptions& options); 215 const rtc::PacketOptions& options);
216 void UpdateHash(); 216 void UpdateHash();
217 bool UpdateNonce(StunMessage* response); 217 bool UpdateNonce(StunMessage* response);
218 218
219 bool HasPermission(const rtc::IPAddress& ipaddr) const; 219 bool HasPermission(const rtc::IPAddress& ipaddr) const;
220 TurnEntry* FindEntry(const rtc::SocketAddress& address) const; 220 TurnEntry* FindEntry(const rtc::SocketAddress& address) const;
221 TurnEntry* FindEntry(int channel_id) const; 221 TurnEntry* FindEntry(int channel_id) const;
222 bool EntryExists(TurnEntry* e);
222 void CreateOrRefreshEntry(const rtc::SocketAddress& address); 223 void CreateOrRefreshEntry(const rtc::SocketAddress& address);
223 void DestroyEntry(TurnEntry* entry); 224 void DestroyEntry(TurnEntry* entry);
224 // Destroys the entry only if |timestamp| matches the destruction timestamp 225 // Destroys the entry only if |timestamp| matches the destruction timestamp
225 // in |entry|. 226 // in |entry|.
226 void DestroyEntryIfNotCancelled(TurnEntry* entry, uint32_t timestamp); 227 void DestroyEntryIfNotCancelled(TurnEntry* entry, uint32_t timestamp);
227 void ScheduleEntryDestruction(TurnEntry* entry); 228 void ScheduleEntryDestruction(TurnEntry* entry);
228 void CancelEntryDestruction(TurnEntry* entry); 229 void CancelEntryDestruction(TurnEntry* entry);
229 void OnConnectionDestroyed(Connection* conn); 230 void OnConnectionDestroyed(Connection* conn);
230 231
231 ProtocolAddress server_address_; 232 ProtocolAddress server_address_;
(...skipping 26 matching lines...) Expand all
258 friend class TurnEntry; 259 friend class TurnEntry;
259 friend class TurnAllocateRequest; 260 friend class TurnAllocateRequest;
260 friend class TurnRefreshRequest; 261 friend class TurnRefreshRequest;
261 friend class TurnCreatePermissionRequest; 262 friend class TurnCreatePermissionRequest;
262 friend class TurnChannelBindRequest; 263 friend class TurnChannelBindRequest;
263 }; 264 };
264 265
265 } // namespace cricket 266 } // namespace cricket
266 267
267 #endif // WEBRTC_P2P_BASE_TURNPORT_H_ 268 #endif // WEBRTC_P2P_BASE_TURNPORT_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/p2p/base/turnport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698