Network Connection Problem

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
nedunuri
Posts: 9
Joined: Thu, 2005-03-10, 20:27

Network Connection Problem

#1 Post by nedunuri »

I am writing an application where client application will connect to CTN PACS server to query and retrieve images.

My code is similar to the one in DCMNET applications. Every thing works fine except ASC_releaseAssociation. By debugging the code I found that defragmentTCP returns DUL_NETWORKCLOSED as connection->read returns -1.

This happens sporadically. The same application works some time.
I tested the application with servers on different machines and is creating this problem only with one server. In other case the application is working fine.

connection->read returns -1 only in ASC_releaseAssociation. Before that I am able to receive the other data from server application.

Please help me to fix the problem.
Thanks and Regards
Ravi Kumar

nedunuri
Posts: 9
Joined: Thu, 2005-03-10, 20:27

#2 Post by nedunuri »

Adding sleep of 2 seconds before closing the socket on the server application solved the problem.
Seems like the server application is closing the socket connection before the my client application receives the data.
Thanks and Regards
Ravi Kumar

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest