This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread 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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Socket from applet" Watch "Socket from applet" New topic

Socket from applet

Mathias Nilsson
Ranch Hand

Joined: Aug 21, 2004
Posts: 367

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

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41123
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

Joined: Oct 29, 2001
Posts: 8836

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

Joined: Mar 22, 2005
Posts: 41123
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:
subject: Socket from applet
Similar Threads
FTP Upload
How can I close a URLConnection?
Applet interacts with server.
Sending data to an applet.
Socket doubt