Socket DeadLock ????????
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   ken_carey
Posted On:   Thursday, August 19, 2004 09:51 AM

Hello, I have a client server Java application. The client must synchronise data with the server and then close a connection. Here is a brief summary of the steps : The client connects to the server socket app and send a START string. The server responds with a READY string. The client then sends it's data to the server . The server will call readUTF() until the client sends data which includes a special terminating character. The problem is the data with the terminating character in it may get lost and never reach the server. As a result the server is waiting forever, deadlocked. the client too cannot proceed until it has a response from the server. The client too may become locked if the server's READY   More>>

Hello,


I have a client server Java application. The client must synchronise data with the server and then close a connection.


Here is a brief summary of the steps :


The client connects to the server socket app and send a START string. The server responds with a READY string. The client then sends it's data to the server . The server will call readUTF() until the client sends data which includes a special terminating character. The problem is the data with the terminating character in it may get lost and never reach the server. As a result the server is waiting forever, deadlocked. the client too cannot proceed until it has a response from the server. The client too may become locked if the server's READY string never reaches it.
At the moment I am developing on our LAN and communication is fine, no packets get lost and it all works fine, but the final version is over GPRS and I'm concerned that packets will get lost.

Am I wrong with the deadlock scenario ever occuring ? or could someone advice as to how to prevent should deadlock occuring ?



thanks,



Ken

   <<Less
About | Sitemap | Contact