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

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

Issue 2068263003: Do not delete a connection in the turn port with permission error or refresh error. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: . Created 4 years, 6 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
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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 TurnEntry* FindEntry(int channel_id) const; 238 TurnEntry* FindEntry(int channel_id) const;
239 bool EntryExists(TurnEntry* e); 239 bool EntryExists(TurnEntry* e);
240 void CreateOrRefreshEntry(const rtc::SocketAddress& address); 240 void CreateOrRefreshEntry(const rtc::SocketAddress& address);
241 void DestroyEntry(TurnEntry* entry); 241 void DestroyEntry(TurnEntry* entry);
242 // Destroys the entry only if |timestamp| matches the destruction timestamp 242 // Destroys the entry only if |timestamp| matches the destruction timestamp
243 // in |entry|. 243 // in |entry|.
244 void DestroyEntryIfNotCancelled(TurnEntry* entry, int64_t timestamp); 244 void DestroyEntryIfNotCancelled(TurnEntry* entry, int64_t timestamp);
245 void ScheduleEntryDestruction(TurnEntry* entry); 245 void ScheduleEntryDestruction(TurnEntry* entry);
246 void CancelEntryDestruction(TurnEntry* entry); 246 void CancelEntryDestruction(TurnEntry* entry);
247 247
248 // Destroys the connection with remote address |address|. Returns true if 248 // Marks the connection with remote address |address| failed and
249 // a connection is found and destroyed. 249 // pruned (a.k.a. write-timed-out). Returns true if a connection is found.
250 bool DestroyConnection(const rtc::SocketAddress& address); 250 bool FailAndPruneConnection(const rtc::SocketAddress& address);
251 251
252 ProtocolAddress server_address_; 252 ProtocolAddress server_address_;
253 RelayCredentials credentials_; 253 RelayCredentials credentials_;
254 AttemptedServerSet attempted_server_addresses_; 254 AttemptedServerSet attempted_server_addresses_;
255 255
256 rtc::AsyncPacketSocket* socket_; 256 rtc::AsyncPacketSocket* socket_;
257 SocketOptionsMap socket_options_; 257 SocketOptionsMap socket_options_;
258 rtc::AsyncResolverInterface* resolver_; 258 rtc::AsyncResolverInterface* resolver_;
259 int error_; 259 int error_;
260 260
(...skipping 18 matching lines...) Expand all
279 friend class TurnEntry; 279 friend class TurnEntry;
280 friend class TurnAllocateRequest; 280 friend class TurnAllocateRequest;
281 friend class TurnRefreshRequest; 281 friend class TurnRefreshRequest;
282 friend class TurnCreatePermissionRequest; 282 friend class TurnCreatePermissionRequest;
283 friend class TurnChannelBindRequest; 283 friend class TurnChannelBindRequest;
284 }; 284 };
285 285
286 } // namespace cricket 286 } // namespace cricket
287 287
288 #endif // WEBRTC_P2P_BASE_TURNPORT_H_ 288 #endif // WEBRTC_P2P_BASE_TURNPORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698