Bo Xu wrote:

> Hi Craig,
>
> Would you please tell me if :
>
> 0
>  I have a TCP server
>
> 1
>     a    I have a applet which connect to my TCP server
>     b   I have already enabled some necessary "Privileges" for Netscape and IE
>
> 2
> Now in my TCP server, with :
>
> "s.getInetAddress().getHostAddress()"      (s is a Socket)
>
>    a    Can I always get the "real :-)" IP of client if the client computer has a 
>public IP
>          in the following cases:
>          client is behide a firewall

You will get a "real" IP address, but it will be the address of the firewall or 
gateway (depending on how that particular company has configured things), not the IP 
address of the PC itself.

>
>          client uses a  proxy server ( I don't know if there is "proxy server" for 
>TCP socket? )

For HTTP, proxy servers are quite common, and it is easy to configure your browser to 
use one.

As in the previous case, your server will get the IP address of the proxy server, not 
of the client PC itself.


>           ...
>
>    b    What will I get if client computer doesn't has a public IP or  doesn't has a 
>IP
>          in the following cases metioned in your email :
>          >... Indeed, the PC itself may not even *have* a real IP address -- it might
>          >be using the reserved Intranet     >address >ranges (with the
>          >gateway providing address translation), or it might even be running a 
>non-IP
>          >protocol internally (with the gateway providing protocol translation as 
>well) ...
>

Same as the above -- you will receive a real IP address of whatever 
Internet-accessible device is responsible for managing traffic for this user (gateway, 
firewall, proxy server, whatever).

>
> 3
> Because now I am developing a audio/video live software with JMF
> (Java Media Framwork),  and JMF uses RTP/UDP to send stream,
> so I need to know the "real" IP of client if it has .  I have tried with servlet,
> and now I try to use TCP socket.
>
> If this email is "off-topic",  I am sorry for that  !
>

Only this particular question :-).  I don't know the details, but I suspect you're 
going to have problems with trying to broadcast UDP packets across the Internet to 
clients behind firewalls.  Remember all the hype about
"push" technology a couple of years ago.  If you look inside, most of the 
implementations actually used a "pull" approach, with the client polling the server 
for updates -- for exactly these types of reasons.


>
> Thanks in advance !
>
> Bo
> Sept.11,2000
>

Craig

====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat

___________________________________________________________________________
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