Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Java Help. Displaying if users connect to page.

  • 08-03-2006 08:35PM
    #1
    Registered Users, Registered Users 2, Paid Member Posts: 8,000 ✭✭✭
    Something about sandwiches


    i've been lookin for this for while now. i cant seem to find it. i have a webpage. it has an applet on it. is there any way i can get it to say something like "2 users connected"? i need to make a java program that lets users interact with each other and this is a pretty big part.

    can anyone help or even point me in the right direction?

    java newb btw.

    thanks


Comments

  • Closed Accounts Posts: 884 ✭✭✭NutJob


    Do u mean an irc chat applet.

    if u do google it and ull find a ton of free ones
    http://www.google.ie/search?q=irc+chat+applet


  • Registered Users, Registered Users 2, Paid Member Posts: 8,000 ✭✭✭The_B_Man
    Something about sandwiches


    no, its a multiplayer game im making.

    this is only the beginning of it. i need to keep track of the users. i was considering session cookies of some sort. and ill also need get-post requests to send data to the applet so it knows wats goin on ie the players move!


  • Registered Users, Registered Users 2, Paid Member Posts: 8,000 ✭✭✭The_B_Man
    Something about sandwiches


    actually, i might stick a PHP backend on it. then just use POST requests from the applet to the PHP backend. would that be easier? any help?


  • Registered Users, Registered Users 2 Posts: 4,188 ✭✭✭pH


    The applet is allowed open sockets back to the server it came from, so you could communicate using PHP pages or jsp using http-put and get. It get's trickier if you want the server to message the client with events -that will rely on a continous tcp/ip stream opened from the client.

    You could 'fake' server messaging by making the clients continually poll, but that's a nasty hack.

    If you have total access to the server you could write a simple java app that listened on a port which the applet can open.


Advertisement