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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 return err; | 180 return err; |
181 } | 181 } |
182 | 182 |
183 int Connect(const SocketAddress& addr) override { | 183 int Connect(const SocketAddress& addr) override { |
184 // TODO: Implicit creation is required to reconnect... | 184 // TODO: Implicit creation is required to reconnect... |
185 // ...but should we make it more explicit? | 185 // ...but should we make it more explicit? |
186 if (state_ != CS_CLOSED) { | 186 if (state_ != CS_CLOSED) { |
187 SetError(EALREADY); | 187 SetError(EALREADY); |
188 return SOCKET_ERROR; | 188 return SOCKET_ERROR; |
189 } | 189 } |
190 if (addr.IsUnresolved()) { | 190 if (addr.IsUnresolvedIP()) { |
191 LOG(LS_VERBOSE) << "Resolving addr in PhysicalSocket::Connect"; | 191 LOG(LS_VERBOSE) << "Resolving addr in PhysicalSocket::Connect"; |
192 resolver_ = new AsyncResolver(); | 192 resolver_ = new AsyncResolver(); |
193 resolver_->SignalDone.connect(this, &PhysicalSocket::OnResolveResult); | 193 resolver_->SignalDone.connect(this, &PhysicalSocket::OnResolveResult); |
194 resolver_->Start(addr); | 194 resolver_->Start(addr); |
195 state_ = CS_CONNECTING; | 195 state_ = CS_CONNECTING; |
196 return 0; | 196 return 0; |
197 } | 197 } |
198 | 198 |
199 return DoConnect(addr); | 199 return DoConnect(addr); |
200 } | 200 } |
(...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1627 break; | 1627 break; |
1628 } | 1628 } |
1629 } | 1629 } |
1630 | 1630 |
1631 // Done | 1631 // Done |
1632 return true; | 1632 return true; |
1633 } | 1633 } |
1634 #endif // WEBRTC_WIN | 1634 #endif // WEBRTC_WIN |
1635 | 1635 |
1636 } // namespace rtc | 1636 } // namespace rtc |
OLD | NEW |