On Fri, 2011-09-02 at 08:22 -0700, angelogeminiani wrote:
> Hi,
> I'm writing an HTTP server and I need client IP.
> I'm using httpcore 4.1.3.
> In Servlets it's easy: request.getRemoteAddr().
> Is there similar method in HttpRequest, or a way to retrieve client IP from
> server?
> 

You can cast any instance of the HttpConnection interface to
HttpInetConnection in order to get access to IP address of its
endpoints:  

http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/HttpInetConnection.html
  

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to