Added get_port() method to socket_t to learn the listening port.