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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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_ |
OLD | NEW |