• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ServerSocket

 
sankar singh
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a doubt in ServerSocket programming,

I have two clients, Lets say ClientA, ClientB and a ServerSocket program(port opened ex :port no.4545

My Question is

Can ClientB only sends message to Server?
Can ClientA only receive message from Server?

Now Server has to do the following

1. Receive message from ClientA (behind some process )
2. Send that processed message to ClientB.

 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

Socket communication is generally two-way communication. As long as a client is connected to the server, both sides can send and receive. Furthermore, if the server is properly multi-threaded, then both clients A and B can do so at the same time.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic