I added some code so that:
client.getRemoteIP(rip)
and
client.getRemoteIP(socket, rip)
are both valid.