V8 to v9 package conversion: how to get user IP address?

I used the following in v8:

use Zend\Http\PhpEnvironment\RemoteAddress;
$ip = $this->app->make(RemoteAddress::class)->getIpAddress();

How do I get a user remote address now in v9?

Turned out I can simply get it from the request:

$ip = $this->request->getClientIp();

Zend Framework is removed.