• Post Reply Bookmark Topic Watch Topic
  • New Topic

multiple clients  RSS feed

 
Yaroslav Chinskiy
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing a simple messeging system. I have one server and multiple clients. Everything works fine, but I wonder what will happend after number of clients grow and they will run at the same time.
All clients are independend threads, and are not aware of the others.

Can I have multiple clients listening on the same port, or do I need to create one client and a request que?

Thank you.

 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it fits your design, you could do this as a mutlicast server. There is an example at Java Tutorials
Hope this helps
 
Yaroslav Chinskiy
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I meant I may have multiple clients on the same platform, and they all use the same port.
For example I may run some agents on my PC, each agent is sending a message (or writes a log) to the server. Agents are my clients.

Thanx.
 
Anil Sadi
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai Yaroslav Chinskiy,
multiple clients can listen on the same port no. There is no problem in it. what exactly the problem you r facing with your program.
Anil S
 
Yaroslav Chinskiy
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx to all, I think I got it.
Yarik.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Anil S",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please choose a new name which meets the requirements.
Thanks.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!