Extended to add get_remote_addr feature.