This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Sockets and Internet Protocols and the fly likes Socket from applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Socket from applet" Watch "Socket from applet" New topic
Author

Socket from applet

Mathias Nilsson
Ranch Hand

Joined: Aug 21, 2004
Posts: 367
Hi!

I have a java applet that connects to a server and sends/recieves data.
It all works fine for everyone that doesn't use a Proxy server.

I connect to the server by using

Socket s = new Socket( HOST , 5050 );
s.getInputStream() and so on.

The company that is using the applet have difficulties in using the applet because they have a proxy server. How can I connect via the Proxy?

Hope you can help me


SCJP1.4
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41592
    
  55
Does this help?


Ping & DNS - my free Android networking tools app
Mathias Nilsson
Ranch Hand

Joined: Aug 21, 2004
Posts: 367
Thanks but it doesn't help.

Can somebody please explain.

I have opened a port in my firewall to communicate from server to client and vise versa. If the client is behind a firewall at my client do they need to open the same port in their firewall... And if so... can somebody please explain.

The client is a java applet.

// Mathias
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8876
    
    8

That depends on the firewall. Many firewalls, like the Windows XP firewall, just block incoming connections. If this were the case at your client, he could make a connection to your server no problem. Other firewalls, like ZoneAlarm, inform the user if a program attempts to make an outgoing connection. If this is the case at your client's site, he will need to configure his firewall to allow a connection.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41592
    
  55
So you think the firewall is the problem? From your first post I gathered that a proxy might be the issue. Or is this a proxying firewall?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Socket from applet