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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 void DispatchPacket(const char* data, size_t size, | 226 void DispatchPacket(const char* data, size_t size, |
227 const rtc::SocketAddress& remote_addr, | 227 const rtc::SocketAddress& remote_addr, |
228 ProtocolType proto, const rtc::PacketTime& packet_time); | 228 ProtocolType proto, const rtc::PacketTime& packet_time); |
229 | 229 |
230 bool ScheduleRefresh(int lifetime); | 230 bool ScheduleRefresh(int lifetime); |
231 void SendRequest(StunRequest* request, int delay); | 231 void SendRequest(StunRequest* request, int delay); |
232 int Send(const void* data, size_t size, | 232 int Send(const void* data, size_t size, |
233 const rtc::PacketOptions& options); | 233 const rtc::PacketOptions& options); |
234 void UpdateHash(); | 234 void UpdateHash(); |
235 bool UpdateNonce(StunMessage* response); | 235 bool UpdateNonce(StunMessage* response); |
| 236 void ResetNonce(); |
236 | 237 |
237 bool HasPermission(const rtc::IPAddress& ipaddr) const; | 238 bool HasPermission(const rtc::IPAddress& ipaddr) const; |
238 TurnEntry* FindEntry(const rtc::SocketAddress& address) const; | 239 TurnEntry* FindEntry(const rtc::SocketAddress& address) const; |
239 TurnEntry* FindEntry(int channel_id) const; | 240 TurnEntry* FindEntry(int channel_id) const; |
240 bool EntryExists(TurnEntry* e); | 241 bool EntryExists(TurnEntry* e); |
241 void CreateOrRefreshEntry(const rtc::SocketAddress& address); | 242 void CreateOrRefreshEntry(const rtc::SocketAddress& address); |
242 void DestroyEntry(TurnEntry* entry); | 243 void DestroyEntry(TurnEntry* entry); |
243 // Destroys the entry only if |timestamp| matches the destruction timestamp | 244 // Destroys the entry only if |timestamp| matches the destruction timestamp |
244 // in |entry|. | 245 // in |entry|. |
245 void DestroyEntryIfNotCancelled(TurnEntry* entry, uint32_t timestamp); | 246 void DestroyEntryIfNotCancelled(TurnEntry* entry, uint32_t timestamp); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 friend class TurnEntry; | 282 friend class TurnEntry; |
282 friend class TurnAllocateRequest; | 283 friend class TurnAllocateRequest; |
283 friend class TurnRefreshRequest; | 284 friend class TurnRefreshRequest; |
284 friend class TurnCreatePermissionRequest; | 285 friend class TurnCreatePermissionRequest; |
285 friend class TurnChannelBindRequest; | 286 friend class TurnChannelBindRequest; |
286 }; | 287 }; |
287 | 288 |
288 } // namespace cricket | 289 } // namespace cricket |
289 | 290 |
290 #endif // WEBRTC_P2P_BASE_TURNPORT_H_ | 291 #endif // WEBRTC_P2P_BASE_TURNPORT_H_ |
OLD | NEW |