This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Using an Applet as a forum/instant messanger

 
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody, I want to write an applet and put it on a website that can be used by a few people at a time to function like a chat room. Basicly I want it to have a text area on top to display the conversation and a textfield on the bottom to add a new entry. My problem is that I don't know how to make it so that everybody see's the same convo. Is there a way to do it so that everybody can see and Convo.append(String newEntry); the same convo? Any comments greatly appreciated. -Dan
 
Bartender
Posts: 9615
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very common question. A search of this forum for "chat" returns 93 hits. A search of the Sockets and Internet Protocols forum returns 113. I'm sure there's other posts spread throughout the Saloon. A browse through them should give you an idea as to what is involved in making a chat app.
 
Dan Maples
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok so now I understand that I have to use a socket and a server, or is it a socket server? Is there a tutorial for socket stuff that I can take a look at?
 
Joe Ess
Bartender
Posts: 9615
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need a server application. Network communication takes place using sockets. You should read through the Java Tutorial chapter on Custom Networking to get the basics.
Be aware that applets can't connect to any server other than the one they were downloaded from (unless they are digitally signed). That means that your server application has to run on the same computer you would host the applet on.
[ July 15, 2004: Message edited by: Joe Ess ]
    Bookmark Topic Watch Topic
  • New Topic