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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 virtual Connection* CreateConnection( | 87 virtual Connection* CreateConnection( |
88 const Candidate& c, PortInterface::CandidateOrigin origin); | 88 const Candidate& c, PortInterface::CandidateOrigin origin); |
89 virtual int SendTo(const void* data, size_t size, | 89 virtual int SendTo(const void* data, size_t size, |
90 const rtc::SocketAddress& addr, | 90 const rtc::SocketAddress& addr, |
91 const rtc::PacketOptions& options, | 91 const rtc::PacketOptions& options, |
92 bool payload); | 92 bool payload); |
93 virtual int SetOption(rtc::Socket::Option opt, int value); | 93 virtual int SetOption(rtc::Socket::Option opt, int value); |
94 virtual int GetOption(rtc::Socket::Option opt, int* value); | 94 virtual int GetOption(rtc::Socket::Option opt, int* value); |
95 virtual int GetError(); | 95 virtual int GetError(); |
96 | 96 |
97 virtual bool HandleIncomingPacket( | 97 virtual bool HandleIncomingPacket(rtc::AsyncPacketSocket* socket, |
98 rtc::AsyncPacketSocket* socket, const char* data, size_t size, | 98 const char* data, size_t size, |
99 const rtc::SocketAddress& remote_addr, | 99 const rtc::SocketAddress& remote_addr, |
100 const rtc::PacketTime& packet_time) { | 100 const rtc::PacketTime& packet_time); |
101 OnReadPacket(socket, data, size, remote_addr, packet_time); | |
102 return true; | |
103 } | |
104 virtual void OnReadPacket(rtc::AsyncPacketSocket* socket, | 101 virtual void OnReadPacket(rtc::AsyncPacketSocket* socket, |
105 const char* data, size_t size, | 102 const char* data, size_t size, |
106 const rtc::SocketAddress& remote_addr, | 103 const rtc::SocketAddress& remote_addr, |
107 const rtc::PacketTime& packet_time); | 104 const rtc::PacketTime& packet_time); |
108 | 105 |
109 virtual void OnSentPacket(rtc::AsyncPacketSocket* socket, | 106 virtual void OnSentPacket(rtc::AsyncPacketSocket* socket, |
110 const rtc::SentPacket& sent_packet); | 107 const rtc::SentPacket& sent_packet); |
111 virtual void OnReadyToSend(rtc::AsyncPacketSocket* socket); | 108 virtual void OnReadyToSend(rtc::AsyncPacketSocket* socket); |
112 virtual bool SupportsProtocol(const std::string& protocol) const { | 109 virtual bool SupportsProtocol(const std::string& protocol) const { |
113 // Turn port only connects to UDP candidates. | 110 // Turn port only connects to UDP candidates. |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 friend class TurnEntry; | 279 friend class TurnEntry; |
283 friend class TurnAllocateRequest; | 280 friend class TurnAllocateRequest; |
284 friend class TurnRefreshRequest; | 281 friend class TurnRefreshRequest; |
285 friend class TurnCreatePermissionRequest; | 282 friend class TurnCreatePermissionRequest; |
286 friend class TurnChannelBindRequest; | 283 friend class TurnChannelBindRequest; |
287 }; | 284 }; |
288 | 285 |
289 } // namespace cricket | 286 } // namespace cricket |
290 | 287 |
291 #endif // WEBRTC_P2P_BASE_TURNPORT_H_ | 288 #endif // WEBRTC_P2P_BASE_TURNPORT_H_ |
OLD | NEW |