How to specify a timeout for receiving data via storescu utility

All other questions regarding DCMTK

Moderator: Moderator Team

Message
Author
nicolas_dicom
Posts: 19
Joined: Fri, 2010-10-29, 21:48

#16 Post by nicolas_dicom »

Hello,

I compiled the latest version from git repository $dcmtk: storescu v3.6.1 CVS $

git clone git://git.dcmtk.org/dcmtk.git .

tried again :
./storescu -v -xs -to 3 -aet SENDER -aec IADCMSERVER 192.168.5.111 110 1.dcm

but still not working,

Code: Select all


D: ======================= END A-ASSOCIATE-RQ ======================
I: Requesting Association
D: setting network send timeout to 60 seconds
D: setting network receive timeout to 60 seconds
D: Constructing Associate RQ PDU


I modified the const int sendTimeout = 3; in dcmtrans.cc

Code: Select all


      /* use a timeout of 60 seconds for the send() function */
      const int sendTimeout = 3;
      DCMNET_DEBUG("setting network send timeout to " << sendTimeout << " seconds");

Tried again and it worked, so can be for some reason the option -to is not being readed ?

Code: Select all


D: ======================= END A-ASSOCIATE-RQ ======================
I: Requesting Association
D: setting network send timeout to 3 seconds
D: setting network receive timeout to 60 seconds
D: Constructing Associate RQ PDU


Otherwise, it will take 60 second to show

Code: Select all


E: 0006:031d TCP I/O Error (Operation now in progress) occurred in routine: writeDataPDU
E: Store SCU Failed: 0006:020e DIMSE Failed to send message
E: 0006:031d TCP I/O Error (Operation now in progress) occurred in routine: writeDataPD

and another 30 seconds to close the command a

Code: Select all

Aborting Association
Regards,

Nicolás

J. Riesmeier
DCMTK Developer
Posts: 2504
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

#17 Post by J. Riesmeier »

Tried again and it worked, so can be for some reason the option -to is not being readed ?
The send/receive timeout values are hardcoded, as you can read in the documentation (macros.txt) and the changes entry. The timeout parameter on the command line is not used for hard errors like loosing the connection during send.

But, as I already mentioned in a previous posting: We have to rework the whole timeout stuff in the network module since it is quite inconsistent (mainly, for historical reasons).

nicolas_dicom
Posts: 19
Joined: Fri, 2010-10-29, 21:48

#18 Post by nicolas_dicom »

Ok, thanks.

Regards,

Nicolás

brpanchal
Posts: 8
Joined: Mon, 2015-09-14, 09:38

Re: How to specify a timeout for receiving data via storescu

#19 Post by brpanchal »

Hello,

Is this timeout working correctly in dcmtk36?

When we call storescu commandline utility and if SCP server is in unresponsive mode (server is in running mode), storescu utility becomes unresponsive even though we specify all different timeouts (overall timeout, ACSE timeout, DIMSE timeout).

Is there any solution available wherein even if the SCP server is in unresponsive mode, the storescu can work?

Thanks,
Bharat

brpanchal
Posts: 8
Joined: Mon, 2015-09-14, 09:38

Re: How to specify a timeout for receiving data via storescu

#20 Post by brpanchal »

Is there anyone who can pls suggest? This is a critical issue.

Thanks for your help in advance.

-Bharat

J. Riesmeier
DCMTK Developer
Posts: 2504
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: How to specify a timeout for receiving data via storescu

#21 Post by J. Riesmeier »

Have you already tried the current development snapshot of the DCMTK? E.g. the following commit might help (depends on when the SCP become "unresponsive"): http://git.dcmtk.org/web?p=dcmtk.git;a= ... 011b954187

brpanchal
Posts: 8
Joined: Mon, 2015-09-14, 09:38

Re: How to specify a timeout for receiving data via storescu

#22 Post by brpanchal »

Thank you very much. With this fix, even if SCP is in "unresponsive" state, storescu is timing out after 60 seconds.
It seems that at present we cannot pass the timeout value from client and hoping that it would be fixed in future release.

Thanks again for your time and response. I appreciate.

-Bharat

J. Riesmeier
DCMTK Developer
Posts: 2504
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: How to specify a timeout for receiving data via storescu

#23 Post by J. Riesmeier »

There is a ticket in our issue tracker for making this timeout configurable (at runtime), i.e. it should be fixed for the next release (whenever this will be).

brpanchal
Posts: 8
Joined: Mon, 2015-09-14, 09:38

Re: How to specify a timeout for receiving data via storescu

#24 Post by brpanchal »

Thanks Jörg Riesmeier.

Actually we need to deploy DCMTK on wince 6.

The fix (dcmtrans.cc available on git) uses setsockopt API which uses “SO_SNDTIMEO” option to set timeout. This fix works fine on windows 32 but does not work on wince 6. After investigation we found that wince 6 doesn’t support socket timeout functionality.
https://msdn.microsoft.com/en-us/library/ee493640.aspx

The following list shows BSD options that are not supported for setsockopt .
• SO_ACCEPTCONN
• SO_RCVLOWAT
• SO_RCVTIMEO
• SO_SNDLOWAT
• SO_SNDTIMEO
• SO_TYPE

By any chance do you have any other solution which can work on wince.
Thanks for your time.
-Bharat

J. Riesmeier
DCMTK Developer
Posts: 2504
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: How to specify a timeout for receiving data via storescu

#25 Post by J. Riesmeier »

I personally have no experience with Windows CE, and, in fact, DCMTK does not claim to support this OS (see INSTALL file).
One of the DCMTK developers started with adding support for Windows CE many years ago but could not finish his work.
There is a feature request (#277, private entry) in our issue tracker regarding "Windows CE support" but priority is "low".

brpanchal
Posts: 8
Joined: Mon, 2015-09-14, 09:38

Re: How to specify a timeout for receiving data via storescu

#26 Post by brpanchal »

Thanks for this information.

Regards,
Bharat

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest