OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/socket/tcp_socket.h" | 5 #include "net/socket/tcp_socket.h" |
6 #include "net/socket/tcp_socket_win.h" | 6 #include "net/socket/tcp_socket_win.h" |
7 | 7 |
8 #include <errno.h> | 8 #include <errno.h> |
9 #include <mstcpip.h> | 9 #include <mstcpip.h> |
10 | 10 |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 const CompletionCallback& callback) { | 490 const CompletionCallback& callback) { |
491 DCHECK(CalledOnValidThread()); | 491 DCHECK(CalledOnValidThread()); |
492 DCHECK_NE(socket_, INVALID_SOCKET); | 492 DCHECK_NE(socket_, INVALID_SOCKET); |
493 DCHECK(!waiting_read_); | 493 DCHECK(!waiting_read_); |
494 CHECK(read_callback_.is_null()); | 494 CHECK(read_callback_.is_null()); |
495 DCHECK(!core_->read_iobuffer_.get()); | 495 DCHECK(!core_->read_iobuffer_.get()); |
496 | 496 |
497 return DoRead(buf, buf_len, callback); | 497 return DoRead(buf, buf_len, callback); |
498 } | 498 } |
499 | 499 |
| 500 int TCPSocketWin::ReadIfReady(IOBuffer* buf, |
| 501 int buf_len, |
| 502 const CompletionCallback& callback) { |
| 503 DCHECK(CalledOnValidThread()); |
| 504 // TODO(xunjieli): Implement this. |
| 505 return ERR_READ_IF_READY_NOT_IMPLEMENTED; |
| 506 } |
| 507 |
500 int TCPSocketWin::Write(IOBuffer* buf, | 508 int TCPSocketWin::Write(IOBuffer* buf, |
501 int buf_len, | 509 int buf_len, |
502 const CompletionCallback& callback) { | 510 const CompletionCallback& callback) { |
503 DCHECK(CalledOnValidThread()); | 511 DCHECK(CalledOnValidThread()); |
504 DCHECK_NE(socket_, INVALID_SOCKET); | 512 DCHECK_NE(socket_, INVALID_SOCKET); |
505 DCHECK(!waiting_write_); | 513 DCHECK(!waiting_write_); |
506 CHECK(write_callback_.is_null()); | 514 CHECK(write_callback_.is_null()); |
507 DCHECK_GT(buf_len, 0); | 515 DCHECK_GT(buf_len, 0); |
508 DCHECK(!core_->write_iobuffer_.get()); | 516 DCHECK(!core_->write_iobuffer_.get()); |
509 | 517 |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1032 } | 1040 } |
1033 | 1041 |
1034 bool TCPSocketWin::GetEstimatedRoundTripTime(base::TimeDelta* out_rtt) const { | 1042 bool TCPSocketWin::GetEstimatedRoundTripTime(base::TimeDelta* out_rtt) const { |
1035 DCHECK(out_rtt); | 1043 DCHECK(out_rtt); |
1036 // TODO(bmcquade): Consider implementing using | 1044 // TODO(bmcquade): Consider implementing using |
1037 // GetPerTcpConnectionEStats/GetPerTcp6ConnectionEStats. | 1045 // GetPerTcpConnectionEStats/GetPerTcp6ConnectionEStats. |
1038 return false; | 1046 return false; |
1039 } | 1047 } |
1040 | 1048 |
1041 } // namespace net | 1049 } // namespace net |
OLD | NEW |