| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 const ProtocolAddress& server_address() const { return server_address_; } | 78 const ProtocolAddress& server_address() const { return server_address_; } |
| 79 // Returns an empty address if the local address has not been assigned. | 79 // Returns an empty address if the local address has not been assigned. |
| 80 rtc::SocketAddress GetLocalAddress() const; | 80 rtc::SocketAddress GetLocalAddress() const; |
| 81 | 81 |
| 82 bool ready() const { return state_ == STATE_READY; } | 82 bool ready() const { return state_ == STATE_READY; } |
| 83 bool connected() const { | 83 bool connected() const { |
| 84 return state_ == STATE_READY || state_ == STATE_CONNECTED; | 84 return state_ == STATE_READY || state_ == STATE_CONNECTED; |
| 85 } | 85 } |
| 86 const RelayCredentials& credentials() const { return credentials_; } | 86 const RelayCredentials& credentials() const { return credentials_; } |
| 87 | 87 |
| 88 virtual ProtocolType GetProtocol() const { return server_address_.proto; } |
| 89 |
| 88 virtual void PrepareAddress(); | 90 virtual void PrepareAddress(); |
| 89 virtual Connection* CreateConnection( | 91 virtual Connection* CreateConnection( |
| 90 const Candidate& c, PortInterface::CandidateOrigin origin); | 92 const Candidate& c, PortInterface::CandidateOrigin origin); |
| 91 virtual int SendTo(const void* data, size_t size, | 93 virtual int SendTo(const void* data, size_t size, |
| 92 const rtc::SocketAddress& addr, | 94 const rtc::SocketAddress& addr, |
| 93 const rtc::PacketOptions& options, | 95 const rtc::PacketOptions& options, |
| 94 bool payload); | 96 bool payload); |
| 95 virtual int SetOption(rtc::Socket::Option opt, int value); | 97 virtual int SetOption(rtc::Socket::Option opt, int value); |
| 96 virtual int GetOption(rtc::Socket::Option opt, int* value); | 98 virtual int GetOption(rtc::Socket::Option opt, int* value); |
| 97 virtual int GetError(); | 99 virtual int GetError(); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 friend class TurnEntry; | 284 friend class TurnEntry; |
| 283 friend class TurnAllocateRequest; | 285 friend class TurnAllocateRequest; |
| 284 friend class TurnRefreshRequest; | 286 friend class TurnRefreshRequest; |
| 285 friend class TurnCreatePermissionRequest; | 287 friend class TurnCreatePermissionRequest; |
| 286 friend class TurnChannelBindRequest; | 288 friend class TurnChannelBindRequest; |
| 287 }; | 289 }; |
| 288 | 290 |
| 289 } // namespace cricket | 291 } // namespace cricket |
| 290 | 292 |
| 291 #endif // WEBRTC_P2P_BASE_TURNPORT_H_ | 293 #endif // WEBRTC_P2P_BASE_TURNPORT_H_ |
| OLD | NEW |