Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SERVER PROGRAM

 
tonyb
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 : pki786@hotmail.com
[ March 02, 2002: Message edited by: tonyb ]
 
Prashanth menon
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Dave Vick
Ranch Hand
Posts: 3244
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!!
 
Arijit Ghosh
Ranch Hand
Posts: 174
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All I would like to state here is that this can be handled efficiently by JMS.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic