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 ]
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.
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!!