| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 } | 197 } |
| 198 void Reset() { | 198 void Reset() { |
| 199 last_stun_buf_.reset(); | 199 last_stun_buf_.reset(); |
| 200 last_stun_msg_.reset(); | 200 last_stun_msg_.reset(); |
| 201 } | 201 } |
| 202 void set_type_preference(int type_preference) { | 202 void set_type_preference(int type_preference) { |
| 203 type_preference_ = type_preference; | 203 type_preference_ = type_preference; |
| 204 } | 204 } |
| 205 | 205 |
| 206 private: | 206 private: |
| 207 void OnSentPacket(rtc::AsyncPacketSocket* socket, |
| 208 const rtc::SentPacket& sent_packet) { |
| 209 PortInterface::SignalSentPacket(sent_packet); |
| 210 } |
| 207 rtc::scoped_ptr<ByteBuffer> last_stun_buf_; | 211 rtc::scoped_ptr<ByteBuffer> last_stun_buf_; |
| 208 rtc::scoped_ptr<IceMessage> last_stun_msg_; | 212 rtc::scoped_ptr<IceMessage> last_stun_msg_; |
| 209 int type_preference_ = 0; | 213 int type_preference_ = 0; |
| 210 }; | 214 }; |
| 211 | 215 |
| 212 class TestChannel : public sigslot::has_slots<> { | 216 class TestChannel : public sigslot::has_slots<> { |
| 213 public: | 217 public: |
| 214 // Takes ownership of |p1| (but not |p2|). | 218 // Takes ownership of |p1| (but not |p2|). |
| 215 TestChannel(Port* p1) | 219 TestChannel(Port* p1) |
| 216 : ice_mode_(ICEMODE_FULL), | 220 : ice_mode_(ICEMODE_FULL), |
| (...skipping 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2520 rtc::scoped_ptr<Port> tcp_port(CreateTcpPort(kLocalAddr1)); | 2524 rtc::scoped_ptr<Port> tcp_port(CreateTcpPort(kLocalAddr1)); |
| 2521 EXPECT_TRUE(tcp_port->SupportsProtocol(TCP_PROTOCOL_NAME)); | 2525 EXPECT_TRUE(tcp_port->SupportsProtocol(TCP_PROTOCOL_NAME)); |
| 2522 EXPECT_TRUE(tcp_port->SupportsProtocol(SSLTCP_PROTOCOL_NAME)); | 2526 EXPECT_TRUE(tcp_port->SupportsProtocol(SSLTCP_PROTOCOL_NAME)); |
| 2523 EXPECT_FALSE(tcp_port->SupportsProtocol(UDP_PROTOCOL_NAME)); | 2527 EXPECT_FALSE(tcp_port->SupportsProtocol(UDP_PROTOCOL_NAME)); |
| 2524 | 2528 |
| 2525 rtc::scoped_ptr<Port> turn_port( | 2529 rtc::scoped_ptr<Port> turn_port( |
| 2526 CreateTurnPort(kLocalAddr1, nat_socket_factory1(), PROTO_UDP, PROTO_UDP)); | 2530 CreateTurnPort(kLocalAddr1, nat_socket_factory1(), PROTO_UDP, PROTO_UDP)); |
| 2527 EXPECT_TRUE(turn_port->SupportsProtocol(UDP_PROTOCOL_NAME)); | 2531 EXPECT_TRUE(turn_port->SupportsProtocol(UDP_PROTOCOL_NAME)); |
| 2528 EXPECT_FALSE(turn_port->SupportsProtocol(TCP_PROTOCOL_NAME)); | 2532 EXPECT_FALSE(turn_port->SupportsProtocol(TCP_PROTOCOL_NAME)); |
| 2529 } | 2533 } |
| OLD | NEW |