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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 sink_->Dispose(); | 507 sink_->Dispose(); |
508 sink_ = NULL; | 508 sink_ = NULL; |
509 } | 509 } |
510 addr_.Clear(); | 510 addr_.Clear(); |
511 state_ = CS_CLOSED; | 511 state_ = CS_CLOSED; |
512 return err; | 512 return err; |
513 } | 513 } |
514 | 514 |
515 int Win32Socket::EstimateMTU(uint16_t* mtu) { | 515 int Win32Socket::EstimateMTU(uint16_t* mtu) { |
516 SocketAddress addr = GetRemoteAddress(); | 516 SocketAddress addr = GetRemoteAddress(); |
517 if (addr.IsAny()) { | 517 if (addr.IsAnyIP()) { |
518 error_ = ENOTCONN; | 518 error_ = ENOTCONN; |
519 return -1; | 519 return -1; |
520 } | 520 } |
521 | 521 |
522 WinPing ping; | 522 WinPing ping; |
523 if (!ping.IsValid()) { | 523 if (!ping.IsValid()) { |
524 error_ = EINVAL; // can't think of a better error ID | 524 error_ = EINVAL; // can't think of a better error ID |
525 return -1; | 525 return -1; |
526 } | 526 } |
527 | 527 |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 bool handled = false; | 845 bool handled = false; |
846 if (wm == s_wm_wakeup_id || (wm == WM_TIMER && wp == 1)) { | 846 if (wm == s_wm_wakeup_id || (wm == WM_TIMER && wp == 1)) { |
847 ss_->Pump(); | 847 ss_->Pump(); |
848 lr = 0; | 848 lr = 0; |
849 handled = true; | 849 handled = true; |
850 } | 850 } |
851 return handled; | 851 return handled; |
852 } | 852 } |
853 | 853 |
854 } // namespace rtc | 854 } // namespace rtc |
OLD | NEW |