I've got another problem

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Mar 2006
Posts: 7
Reputation: parvin1987 is an unknown quantity at this point 
Solved Threads: 0
parvin1987 parvin1987 is offline Offline
Newbie Poster

I've got another problem

 
0
  #1
Jul 10th, 2006
I how another question

I ran a program with one client and one server.
it works correctly .but when I have a multiClient program ,the serverThread can not read the sentence from client .why it can't do this?is that because of extending thread

I know that client class sends the sentence but the server can not read that .what should I do?

please help me
Last edited by parvin1987; Jul 10th, 2006 at 2:28 am.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: I've got another problem

 
0
  #2
Jul 12th, 2006
First of all, try to make your sentences more clear so I can understand. Secondly, are you sure the client has established a connection?
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 9
Reputation: danglingChap is an unknown quantity at this point 
Solved Threads: 0
danglingChap danglingChap is offline Offline
Newbie Poster

Re: I've got another problem

 
0
  #3
Jul 13th, 2006
Originally Posted by parvin1987
I how another question

I ran a program with one client and one server.
it works correctly .but when I have a multiClient program ,the serverThread can not read the sentence from client .why it can't do this?is that because of extending thread

I know that client class sends the sentence but the server can not read that .what should I do?

please help me
Please do ask question in bit more detail. We can't get the design of program you are making with these sentences.

There are a bit things that you can check. First of all make sure that each client is establishing the connectionwith server.

A better approach is to open connection with each client in separate thread. i.e if there are 3 clients connected to server, server must be running 3 threads to listen from these clients.
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 18
Reputation: N[e]tt[e] is an unknown quantity at this point 
Solved Threads: 0
N[e]tt[e] N[e]tt[e] is offline Offline
Newbie Poster

Re: I've got another problem

 
0
  #4
Jul 15th, 2006
well.. did u put while(true) ??
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 7
Reputation: parvin1987 is an unknown quantity at this point 
Solved Threads: 0
parvin1987 parvin1987 is offline Offline
Newbie Poster

Re: I've got another problem

 
0
  #5
Jul 15th, 2006
thanks all
I opened a new thread for each client and put a while (true) .now my program works correctly
thanks a lot
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC