Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Multi Thread Server Client

Posted on 2006-06-01
5
Medium Priority
?
305 Views
Last Modified: 2008-03-17
Basically I want to make something similar to a messenger, or rather to IRC.

Server wait for clients to connect, if a client connects, a thread its created for him. I plan to make a swing graphical interface for Client, with a text box for user to write his message and a send button to send it to server. Also i guess that Client needs a thread that keeps listening for messages from server and update a TextArea when a massage its received. If user inputs, message its sended to server, and server resend it to ALL clients connected.

Any hints how I can do this best ? Some code will nice also because im new to this.
0
Comment
Question by:brightwood
5 Comments
 
LVL 6

Expert Comment

by:phuocnh
ID: 16812634
About server, you can use a JMS server to implement it and use topic connection.
You make an JMS endpoint to client can connect to this enpoint.
Phuoc
0
 
LVL 14

Accepted Solution

by:
hoomanv earned 2000 total points
ID: 16813594
0
 
LVL 35

Expert Comment

by:girionis
ID: 16814969
I think the best place to start is here: http://java.sun.com/docs/books/tutorial/networking/sockets/clientServer.html which is a step by step tutorial on how to write a client/server application in Java.
0
 
LVL 3

Expert Comment

by:Kanti
ID: 16817190
This has the example which might help

http://www.cise.ufl.edu/~amyles/tcpchat/
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn different types of Android Layout and some basics of an Android App.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month13 days, 19 hours left to enroll

581 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