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