This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,899 Users
  • 2,269,649 Discussions
  • 7,916,821 Comments

Discussions

Can Java Applets Accept Incoming Connections?

831132
831132 Member Posts: 3
edited Jan 18, 2011 12:04AM in Java Applet Development
I know after downloading a Java Applet from a server, the applet can only connect to the server where it is download. But what about accepting connections other than the server? Can Applet sit in a loop, listening to connections, and accept connections from outside world?

Thnaks in advance.

Answers

  • tschodt
    tschodt Member Posts: 537
    user13732465 wrote:
    I know after downloading a Java Applet from a server, the applet can only connect to the server where it is download. But what about accepting connections other than the server? Can Applet sit in a loop, listening to connections, and accept connections from outside world?
    Did you try?
    What happened?
  • 831132
    831132 Member Posts: 3
    Not yet. I want to know technically it's possible or not, because of sandbox.
  • tschodt
    tschodt Member Posts: 537
    Will the applet be signed?
  • User_64CKJ
    User_64CKJ Member Posts: 7,279 Silver Badge
    See also "Can Java Applets(unsigned) Accept Incoming Connections " (http://forums.oracle.com/forums/thread.jspa?threadID=2158964).
  • darrylburke
    darrylburke Member Posts: 18,007
    Andrew Thompson wrote:
    See also ...
    Moderator action: user13732465, please don't double post the same question.

    Moderator action: Deleted the other thread.

    db
  • User_64CKJ
    User_64CKJ Member Posts: 7,279 Silver Badge
    user13732465 wrote:
    Not yet. I want to know technically it's possible or not, because of sandbox.
    OK. On forums we typically expect the person asking the question (e.g. you), to do a bit of research rather than expect to be spoon-fed answers. But now that other matter of the double-post has been settled (thanks Darryl), this is getting painful.

    An unsigned applet would not be able to 'accept incoming connections' from anything other than its home server.

    But to probe this a little further, what is your exact use-case? I cannot think of anything where it would be logical for an applet to be communicating with anything but its own server. For example, a chat application would have all the Java applets sending their messages back to the server for distribution back out to the intended recipient of the message. And every applet could be sand-boxed.

    So what (functionality) is it that you think requires an applet to accept arbitrary connections?
  • 831132
    831132 Member Posts: 3
    edited Jan 18, 2011 12:04AM
    Sorry for the double post. I should really hold my breath to wait for a simple answer like yes or no.

    The question is related to download crossdomain.xml file and p2p applicaiton.

    Edited by: user13732465 on Jan 17, 2011 9:03 PM
This discussion has been closed.