diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-19 23:49:35 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-19 23:49:35 +0000 |
commit | e7f74dada8e347bde1e7e88e88d6fd3c9882375a (patch) | |
tree | d563b0762ffe6062005b24e277dd1bb4a8019aef /remoting/jingle_glue/ssl_socket_adapter.cc | |
parent | 15ff0118ad82bfc4b89ad612f130fed0df512612 (diff) | |
download | chromium_src-e7f74dada8e347bde1e7e88e88d6fd3c9882375a.zip chromium_src-e7f74dada8e347bde1e7e88e88d6fd3c9882375a.tar.gz chromium_src-e7f74dada8e347bde1e7e88e88d6fd3c9882375a.tar.bz2 |
Added GetLocalAddress() in net::ClientSocket.
BUG=None
TEST=Unittests
Review URL: http://codereview.chromium.org/6840033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82190 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/jingle_glue/ssl_socket_adapter.cc')
-rw-r--r-- | remoting/jingle_glue/ssl_socket_adapter.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/remoting/jingle_glue/ssl_socket_adapter.cc b/remoting/jingle_glue/ssl_socket_adapter.cc index 251f771..51273f5 100644 --- a/remoting/jingle_glue/ssl_socket_adapter.cc +++ b/remoting/jingle_glue/ssl_socket_adapter.cc @@ -7,6 +7,7 @@ #include "base/base64.h" #include "base/compiler_specific.h" #include "base/message_loop.h" +#include "jingle/glue/utils.h" #include "net/base/address_list.h" #include "net/base/cert_verifier.h" #include "net/base/host_port_pair.h" @@ -276,6 +277,15 @@ int TransportSocket::GetPeerAddress(net::AddressList* address) const { return net::OK; } +int TransportSocket::GetLocalAddress(net::IPEndPoint* address) const { + talk_base::SocketAddress socket_address = socket_->GetLocalAddress(); + if (jingle_glue::SocketAddressToIPEndPoint(socket_address, address)) { + return net::OK; + } else { + return net::ERR_FAILED; + } +} + const net::BoundNetLog& TransportSocket::NetLog() const { return net_log_; } |