GetSockAddr function added