Obtain connected IP address from socket

Change-Id: I42b0fffe02d3255a84ca0603201bb3315c212329