hi bo xu
you can use
InetAddress <varname>=
InetAddress.getByName(<httpservletrequestvariable>.getRemoteAddr())
then you can get the Ip address from the InetAddress
rgs
Anup
----- Original Message -----
From: "Bo Xu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 19, 2000 3:03 AM
Subject: how to know the IP address of a "client" from servlet?


> Hi,
>
> If  my servlet "received a request from a client",  how can I know the IP
> address of  this client ?  because now I am developing a "RTP  server",
and I
> need to know the IP address of this client, then I can send RTP stream to
him.
>
>
>
> If I use "TCP socket",  I can use "s.getInetAddress().getHostAddress()" to
get
> the IP address of this client. But how to do it with a servlet?
>
>
>
>
> Thanks in advance!
>
>
> Bo
> May 18,2000
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to