Solved

Simple JAVA Server

Posted on 2001-06-22
3
214 Views
Last Modified: 2013-11-24
Hi,

I'm a newbie in Java so.. please don't laugh ;)

I need a simple Java server on which clients can connect. And every Message one Client send, all connected clients should recieve them.

If somebody maybe have some samples ...

I use JBuilder 4.

Of course the server should be in a own Thread...

Thanks alot
Lycar
0
Comment
Question by:Lycar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Expert Comment

by:goldwarlock
ID: 6219538
Use Java Servlets
Any example on generic servlet will help you
0
 
LVL 1

Expert Comment

by:goldwarlock
ID: 6219608
btw: visit my site
www.xanga.com/goldwarlock
0
 
LVL 2

Accepted Solution

by:
jorj earned 50 total points
ID: 6223443
You don't need a servlet for this; a java server will do the job.

Basicaly you have to create a server that listens on a port. When a new client connect you will have to create a client object which keep also the port number the clients has connected, its nick and whatever you need and put the client in a list. Any incomming message is then sent by going throught the list and calling a client.sendMessage() method. You must take care of the nickname to be unique in the list, so you can use the nick as an ID in order to know each message's source.

As I saw you are a java programmer so you will not have problem in creating a java server. With the rest I can give you more details if you need.
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question