ASC_requestAssociation Wait for 1 sec

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
deepak.bme
Posts: 10
Joined: Tue, 2013-01-29, 12:11

ASC_requestAssociation Wait for 1 sec

#1 Post by deepak.bme »

Hi All,

I am using ASC_requestAssociation for opening an associations with SCP .My code Looks like this

ASC_initializeNetwork(NET_REQUESTOR, 0, 0, &mDcmtkNetwork);

DUL_BLOCKOPTIONS block = DUL_NOBLOCK;

// Request the SCP to open an association

ASC_requestAssociation( mDcmtkNetwork,params, &mAssociation,NULL,NULL,block,0);

IF my SCP is not UP , It still waits for 1 second to respond the status.
I want to respond immediately is SCP is NOT UP.
Please suggest me any other option need to be done to active this.

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: ASC_requestAssociation Wait for 1 sec

#2 Post by Michael Onken »

Hi,

which OS are you on?

I am not sure about the solution (neither about the analysis), but you can please try to set the dcmConnectionTimeout (global mutex) to 0 before requesting the association? I.e. call

Code: Select all

  dcmConnectionTimeout.set(0);
and tell me what happens.

Thanks,
Michael

deepak.bme
Posts: 10
Joined: Tue, 2013-01-29, 12:11

Re: ASC_requestAssociation Wait for 1 sec

#3 Post by deepak.bme »

this works for me. :) :D
Thank you very much for the reply.

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: ASC_requestAssociation Wait for 1 sec

#4 Post by Michael Onken »

Great, I also added the connection timeout setting to the DcmSCU class (which you may consider for your project, by the way) in order to be more "visible" to library users. The setting should not be global in the future, but this requires some more better done -- later. :)

Best,
Michael

Post Reply

Who is online

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