commit | bc8a290f2a0a0e16f078d7c9cf2b2d97edf4d0f2 | [log] [tgz] |
---|---|---|
author | Kenny Root <kroot@google.com> | Thu Feb 11 14:08:21 2016 -0800 |
committer | Kenny Root <kroot@google.com> | Thu Mar 03 23:40:56 2016 -0800 |
tree | 9c41bc63e8c9b8195ff61bce62bedc80d78ece62 | |
parent | de8236f4bb9d70fa4e6a52679b4bf40b04c44f9b [diff] |
Try to get peer hostname from SocketAddress Java 7 added a new method to InetSocketAddress called getHostString() which returns the unresolved host for a given address. This should be suitable for use with SNI as long as it isn't an IP address. This also helps with testing because we can use serialization tricks to rewrite the "hostname" field of an already-serialized loopback address. Bug: 27271561 Change-Id: I9845e57d505712cdfee87d18246a1a3b021deea3