This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes ServerSocket Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "ServerSocket" Watch "ServerSocket" New topic
Author

ServerSocket

sankar singh
Ranch Hand

Joined: Aug 17, 2007
Posts: 40
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
Marshal

Joined: Mar 22, 2005
Posts: 41068
    
  43
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.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ServerSocket
 
Similar Threads
Could you pls resolve this
locking and unlocking mechanism
Pls anyone answer this, its urgent
My Locking Strategy...
Why I lost points in locking, pls comment on my code