dcsimg
client server
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rahul_Sharma
Posted On:   Monday, June 21, 2004 04:25 PM

i saw this ques. on jguru.


I have a server which communicates with each client.
The client has 2 threads, one for sending msg and
another for receiving msg from server.
How can I know if server is up before starting these 2 threads?

I want to make sure server is up before starting the 2 client threads!!

why do we req 2 threads over here
regards

Re: client server

Posted By:   Simon_Ablett  
Posted On:   Tuesday, June 22, 2004 04:37 AM

You would generally take this approach if the receipt and despatch of messages to / from the server were not tightly synchronised. In a synced system, the despatch of a message to the server might be expected to receive a single message back in response (for example). In a non-synced system the number of messages to and from the server and the timing of them might not be tightly bound to those sent from the client. The use of two seperate threads means that you are not waiting for receipt of a message when you have a number of messages ready for despatch (for example). Does this make sense?

Regards.

Re: client server

Posted By:   varun_shastr  
Posted On:   Monday, June 21, 2004 05:23 PM

This is my question!!

well that is the way i chose to implement the protocol!!!

Re: client server

Posted By:   varun_shastr  
Posted On:   Monday, June 21, 2004 05:23 PM

This is my question!!

well that is the way i chose to implement the protocol!!!

About | Sitemap | Contact