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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 #include "webrtc/p2p/base/common.h" | 69 #include "webrtc/p2p/base/common.h" |
70 #include "webrtc/base/common.h" | 70 #include "webrtc/base/common.h" |
71 #include "webrtc/base/logging.h" | 71 #include "webrtc/base/logging.h" |
72 | 72 |
73 namespace cricket { | 73 namespace cricket { |
74 | 74 |
75 TCPPort::TCPPort(rtc::Thread* thread, | 75 TCPPort::TCPPort(rtc::Thread* thread, |
76 rtc::PacketSocketFactory* factory, | 76 rtc::PacketSocketFactory* factory, |
77 rtc::Network* network, | 77 rtc::Network* network, |
78 const rtc::IPAddress& ip, | 78 const rtc::IPAddress& ip, |
79 uint16 min_port, | 79 uint16_t min_port, |
80 uint16 max_port, | 80 uint16_t max_port, |
81 const std::string& username, | 81 const std::string& username, |
82 const std::string& password, | 82 const std::string& password, |
83 bool allow_listen) | 83 bool allow_listen) |
84 : Port(thread, LOCAL_PORT_TYPE, factory, network, ip, min_port, max_port, | 84 : Port(thread, |
85 username, password), | 85 LOCAL_PORT_TYPE, |
| 86 factory, |
| 87 network, |
| 88 ip, |
| 89 min_port, |
| 90 max_port, |
| 91 username, |
| 92 password), |
86 incoming_only_(false), | 93 incoming_only_(false), |
87 allow_listen_(allow_listen), | 94 allow_listen_(allow_listen), |
88 socket_(NULL), | 95 socket_(NULL), |
89 error_(0) { | 96 error_(0) { |
90 // TODO(mallinath) - Set preference value as per RFC 6544. | 97 // TODO(mallinath) - Set preference value as per RFC 6544. |
91 // http://b/issue?id=7141794 | 98 // http://b/issue?id=7141794 |
92 } | 99 } |
93 | 100 |
94 bool TCPPort::Init() { | 101 bool TCPPort::Init() { |
95 if (allow_listen_) { | 102 if (allow_listen_) { |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 void TCPConnection::ConnectSocketSignals(rtc::AsyncPacketSocket* socket) { | 498 void TCPConnection::ConnectSocketSignals(rtc::AsyncPacketSocket* socket) { |
492 if (outgoing_) { | 499 if (outgoing_) { |
493 socket->SignalConnect.connect(this, &TCPConnection::OnConnect); | 500 socket->SignalConnect.connect(this, &TCPConnection::OnConnect); |
494 } | 501 } |
495 socket->SignalReadPacket.connect(this, &TCPConnection::OnReadPacket); | 502 socket->SignalReadPacket.connect(this, &TCPConnection::OnReadPacket); |
496 socket->SignalReadyToSend.connect(this, &TCPConnection::OnReadyToSend); | 503 socket->SignalReadyToSend.connect(this, &TCPConnection::OnReadyToSend); |
497 socket->SignalClose.connect(this, &TCPConnection::OnClose); | 504 socket->SignalClose.connect(this, &TCPConnection::OnClose); |
498 } | 505 } |
499 | 506 |
500 } // namespace cricket | 507 } // namespace cricket |
OLD | NEW |