hi, i am having problems writing a program that will allow two user to send messages to each other.
1. The messages can contain more than one line. And the programs should allow the user to finish typing an outgoing message before it displays any incoming messages from the other user. 2. The messages do not have to be sent alternately. I.e. it should be possible for one user to send several messages before the other user sends a reply.
thanks to anyone who can solve this email : email@example.com [ March 02, 2002: Message edited by: tonyb ]
Joined: Feb 20, 2001
hi The first question is not quite clear. I think its contrary to the second one. If the incoming message should be displayed only after the outgoing message, then it is same as the second case. That is message sent alternately. If this should go simultaenous, then please try using multithreading. The outstream can be put on a thread different from the instream. So even if one is idle other can send message.
Joined: May 05, 2000
Originally posted by tonyb: hi, i am having problems writing a program that will allow two user to send messages to each other.
Why not show what you have and show where you are stuck. Obviously this is your homework so we don't want to do it for you but we are willing to help.
tonyb Welcome to the Java Ranch, we hope you’ll enjoy visiting as a regular however, your name is not in keeping with our naming policy here at the ranch. Please change your display name to an appropriate name as shown in the policy. Thanks again and we hope to see you around the ranch!!
Joined: Feb 01, 2002
All I would like to state here is that this can be handled efficiently by JMS.