my dog learned polymorphism*
The moose likes Sockets and Internet Protocols and the fly likes Server/Client problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Server/Client problem" Watch "Server/Client problem" New topic
Author

Server/Client problem

jim delmar
Greenhorn

Joined: Feb 02, 2012
Posts: 1
Hello guys!! New one here. I hava a problem with my code.
Here 's the server code



and here is the client's



So i make a server who waits for connections.When a client connects, if we(the server) send the command showinfo, it responds with some system information.The problem is that it is a multithreaded server and many clients connect.So if for example connect 2 clients at the server we have to type 2 times showinfo and then the clients give us the information. How can i make the clients respond immediately with typing showinfo for each one and don't wait until i type showinfo for all the clients. It's a bit tiring to type 50 times showinfo if there are 50 clients before you can execute your command. Thank you in advance (i have tried some thread synchronization and some sleep() join() commands but i haven't reach a conclusion i hope you can help a bit.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Server/Client problem
 
Similar Threads
cleint-server interaction
Running a client/server apllication
display http header
Push/Grab archive file from server
port number