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

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

Issue 1595613004: Reset TURN port NONCE when a new socket is created. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 4 years, 11 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 | « no previous file | webrtc/p2p/base/turnport.cc » ('j') | webrtc/p2p/base/turnport_unittest.cc » ('J')
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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 void DispatchPacket(const char* data, size_t size, 225 void DispatchPacket(const char* data, size_t size,
226 const rtc::SocketAddress& remote_addr, 226 const rtc::SocketAddress& remote_addr,
227 ProtocolType proto, const rtc::PacketTime& packet_time); 227 ProtocolType proto, const rtc::PacketTime& packet_time);
228 228
229 bool ScheduleRefresh(int lifetime); 229 bool ScheduleRefresh(int lifetime);
230 void SendRequest(StunRequest* request, int delay); 230 void SendRequest(StunRequest* request, int delay);
231 int Send(const void* data, size_t size, 231 int Send(const void* data, size_t size,
232 const rtc::PacketOptions& options); 232 const rtc::PacketOptions& options);
233 void UpdateHash(); 233 void UpdateHash();
234 bool UpdateNonce(StunMessage* response); 234 bool UpdateNonce(StunMessage* response);
235 void ResetNonce();
235 236
236 bool HasPermission(const rtc::IPAddress& ipaddr) const; 237 bool HasPermission(const rtc::IPAddress& ipaddr) const;
237 TurnEntry* FindEntry(const rtc::SocketAddress& address) const; 238 TurnEntry* FindEntry(const rtc::SocketAddress& address) const;
238 TurnEntry* FindEntry(int channel_id) const; 239 TurnEntry* FindEntry(int channel_id) const;
239 bool EntryExists(TurnEntry* e); 240 bool EntryExists(TurnEntry* e);
240 void CreateOrRefreshEntry(const rtc::SocketAddress& address); 241 void CreateOrRefreshEntry(const rtc::SocketAddress& address);
241 void DestroyEntry(TurnEntry* entry); 242 void DestroyEntry(TurnEntry* entry);
242 // Destroys the entry only if |timestamp| matches the destruction timestamp 243 // Destroys the entry only if |timestamp| matches the destruction timestamp
243 // in |entry|. 244 // in |entry|.
244 void DestroyEntryIfNotCancelled(TurnEntry* entry, uint32_t timestamp); 245 void DestroyEntryIfNotCancelled(TurnEntry* entry, uint32_t timestamp);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 friend class TurnEntry; 281 friend class TurnEntry;
281 friend class TurnAllocateRequest; 282 friend class TurnAllocateRequest;
282 friend class TurnRefreshRequest; 283 friend class TurnRefreshRequest;
283 friend class TurnCreatePermissionRequest; 284 friend class TurnCreatePermissionRequest;
284 friend class TurnChannelBindRequest; 285 friend class TurnChannelBindRequest;
285 }; 286 };
286 287
287 } // namespace cricket 288 } // namespace cricket
288 289
289 #endif // WEBRTC_P2P_BASE_TURNPORT_H_ 290 #endif // WEBRTC_P2P_BASE_TURNPORT_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/p2p/base/turnport.cc » ('j') | webrtc/p2p/base/turnport_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698