diff options
Diffstat (limited to 'net/socket/socket_test_util.cc')
-rw-r--r-- | net/socket/socket_test_util.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc index 577c7d2..ab10549 100644 --- a/net/socket/socket_test_util.cc +++ b/net/socket/socket_test_util.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -786,6 +786,12 @@ bool MockTCPClientSocket::IsConnectedAndIdle() const { return IsConnected(); } +int MockTCPClientSocket::GetPeerAddress(AddressList* address) const { + if (!IsConnected()) + return ERR_SOCKET_NOT_CONNECTED; + return MockClientSocket::GetPeerAddress(address); +} + bool MockTCPClientSocket::WasEverUsed() const { return was_used_to_convey_data_; } |