7 Replies Latest reply: Aug 11, 2008 2:09 PM by 3004 RSS

    Cannot create client/server socket connection in applet

    843785
      I have client and server applet. They are both signed. I can connect them on localhost, and
      even if they are on server, but only if they are both executed on my machine. When there is
      one of them on my machine and the other one on my friend's there is a ConnectoinTimeout Exception.

      Pakestina
        • 1. Re: Cannot create client/server socket connection in applet
          DrClap
          Then presumably there's some network furniture preventing that connection from happening. A firewall or a router or a proxy server or something.

          (A server applet?????)
          • 2. Re: Cannot create client/server socket connection in applet
            843785
            There is no proxy and firewall is turned off.
            Does it means it's router fault? However i can't control it's firewall.

            Server applet? Applet containing ServerSocket object.
            • 3. Re: Cannot create client/server socket connection in applet
              843785
              Pakestina wrote:
              There is no proxy and firewall is turned off.
              Does it means it's router fault? However i can't control it's firewall.

              Server applet? Applet containing ServerSocket object.
              This is a very bad idea, and I am almost 100% sure you can't do that.
              • 4. Re: Cannot create client/server socket connection in applet
                3004
                Simply signing isn't enough, AFAIK. If an applet is going to connect to any server other than the one that served it, the applet has to be signed, and I think the browser's security settings have to allow it, though I don't know the details.

                Seems to me like the first step will be to figure out if it's the network path in general, or if it's the applet in particular. Try making that same connection without the applet.
                • 5. Re: Cannot create client/server socket connection in applet
                  843785
                  cotton.m wrote:This is a very bad idea, and I am almost 100% sure you can't do that.
                  Well, as I said it works when only one machine is used, but for this program it's not
                  necessary to be an 'applet server' so I'll try with stable application server.
                  Could that be the problem or it's more possible that the router is limiting the traffic?
                  And where can I find a server where I could host this server-application?
                  • 6. Re: Cannot create client/server socket connection in applet
                    843785
                    Pakestina wrote:
                    cotton.m wrote:This is a very bad idea, and I am almost 100% sure you can't do that.
                    Well, as I said it works when only one machine is used, but for this program it's not
                    necessary to be an 'applet server' so I'll try with stable application server.
                    Could that be the problem or it's more possible that the router is limiting the traffic?
                    And where can I find a server where I could host this server-application?
                    Applets with networking can be tricky. And trying to do a server socket in an applet is going to be an excercise in frustration because of client routers.

                    Use Google and find a hosting provider who does what you want I guess. I'd consider giving us more information about what your plan is rather than wasting time with something that either won't work at all for security reasons or won't work practically because of the need for user interventions.
                    • 7. Re: Cannot create client/server socket connection in applet
                      DrClap
                      Pakestina wrote:
                      Server applet? Applet containing ServerSocket object.
                      Yes, that was my guess. But my question was, why an applet? Why not an application? There are very few situations where it's necessary to download a program from a website and run it as a server on a client system.