socket: Add get_address for socket

Useful for hosts to determine their port number so clients can easily
connect without having to deal with port forwarding.