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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 | 309 |
310 sockaddr_storage saddr; | 310 sockaddr_storage saddr; |
311 size_t len = addr.ToSockAddrStorage(&saddr); | 311 size_t len = addr.ToSockAddrStorage(&saddr); |
312 int err = ::bind(socket_, | 312 int err = ::bind(socket_, |
313 reinterpret_cast<sockaddr*>(&saddr), | 313 reinterpret_cast<sockaddr*>(&saddr), |
314 static_cast<int>(len)); | 314 static_cast<int>(len)); |
315 UpdateLastError(); | 315 UpdateLastError(); |
316 return err; | 316 return err; |
317 } | 317 } |
318 | 318 |
| 319 int Win32Socket::BindToNetwork(NetworkHandle handle) { |
| 320 // Not implemented. |
| 321 ASSERT(false); |
| 322 return 0; |
| 323 } |
| 324 |
319 int Win32Socket::Connect(const SocketAddress& addr) { | 325 int Win32Socket::Connect(const SocketAddress& addr) { |
320 if (state_ != CS_CLOSED) { | 326 if (state_ != CS_CLOSED) { |
321 SetError(EALREADY); | 327 SetError(EALREADY); |
322 return SOCKET_ERROR; | 328 return SOCKET_ERROR; |
323 } | 329 } |
324 | 330 |
325 if (!addr.IsUnresolvedIP()) { | 331 if (!addr.IsUnresolvedIP()) { |
326 return DoConnect(addr); | 332 return DoConnect(addr); |
327 } | 333 } |
328 | 334 |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 bool handled = false; | 851 bool handled = false; |
846 if (wm == s_wm_wakeup_id || (wm == WM_TIMER && wp == 1)) { | 852 if (wm == s_wm_wakeup_id || (wm == WM_TIMER && wp == 1)) { |
847 ss_->Pump(); | 853 ss_->Pump(); |
848 lr = 0; | 854 lr = 0; |
849 handled = true; | 855 handled = true; |
850 } | 856 } |
851 return handled; | 857 return handled; |
852 } | 858 } |
853 | 859 |
854 } // namespace rtc | 860 } // namespace rtc |
OLD | NEW |