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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 return socket_; | 122 return socket_; |
123 } | 123 } |
124 | 124 |
125 // Signal with resolved server address. | 125 // Signal with resolved server address. |
126 // Parameters are port, server address and resolved server address. | 126 // Parameters are port, server address and resolved server address. |
127 // This signal will be sent only if server address is resolved successfully. | 127 // This signal will be sent only if server address is resolved successfully. |
128 sigslot::signal3<TurnPort*, | 128 sigslot::signal3<TurnPort*, |
129 const rtc::SocketAddress&, | 129 const rtc::SocketAddress&, |
130 const rtc::SocketAddress&> SignalResolvedServerAddress; | 130 const rtc::SocketAddress&> SignalResolvedServerAddress; |
131 | 131 |
132 // This signal is only for testing purpose. | |
133 sigslot::signal3<TurnPort*, const rtc::SocketAddress&, int> | 132 sigslot::signal3<TurnPort*, const rtc::SocketAddress&, int> |
134 SignalCreatePermissionResult; | 133 SignalCreatePermissionResult; |
135 | 134 |
136 protected: | 135 protected: |
137 TurnPort(rtc::Thread* thread, | 136 TurnPort(rtc::Thread* thread, |
138 rtc::PacketSocketFactory* factory, | 137 rtc::PacketSocketFactory* factory, |
139 rtc::Network* network, | 138 rtc::Network* network, |
140 rtc::AsyncPacketSocket* socket, | 139 rtc::AsyncPacketSocket* socket, |
141 const std::string& username, | 140 const std::string& username, |
142 const std::string& password, | 141 const std::string& password, |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 // The number of retries made due to allocate mismatch error. | 241 // The number of retries made due to allocate mismatch error. |
243 size_t allocate_mismatch_retries_; | 242 size_t allocate_mismatch_retries_; |
244 | 243 |
245 friend class TurnEntry; | 244 friend class TurnEntry; |
246 friend class TurnAllocateRequest; | 245 friend class TurnAllocateRequest; |
247 friend class TurnRefreshRequest; | 246 friend class TurnRefreshRequest; |
248 friend class TurnCreatePermissionRequest; | 247 friend class TurnCreatePermissionRequest; |
249 friend class TurnChannelBindRequest; | 248 friend class TurnChannelBindRequest; |
250 }; | 249 }; |
251 | 250 |
| 251 class TurnConnection : public ProxyConnection { |
| 252 public: |
| 253 TurnConnection(TurnPort* port, |
| 254 size_t index, |
| 255 const Candidate& remote_candidate); |
| 256 virtual ~TurnConnection(); |
| 257 |
| 258 private: |
| 259 void OnCreatePermissionResult(TurnPort* port, |
| 260 const rtc::SocketAddress& remote_address, |
| 261 int code); |
| 262 |
| 263 TurnPort* turn_port_; |
| 264 }; |
| 265 |
252 } // namespace cricket | 266 } // namespace cricket |
253 | 267 |
254 #endif // WEBRTC_P2P_BASE_TURNPORT_H_ | 268 #endif // WEBRTC_P2P_BASE_TURNPORT_H_ |
OLD | NEW |