-
Notifications
You must be signed in to change notification settings - Fork 631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set Time Out duration for requested association for C-Echo / C-Store #1752
Comments
In the API Documentation, the DicomClient constructonr lets you set the AssociationRequestTimeoutInMs via the DicomClientOptions hope this helps! |
Thanks for reply....
But even after no response from server after 5 sec. this event handler is not getting accessed by program. But also the system.exception error is getting logged as Exception thrown: 'System.Net.Sockets.SocketException' in System.dll. |
Maybe A-Abort? |
Take a look at this class: Tests/FO-DICOM.Tests/Network/Client/DicomClientTimeoutTests.cs
Basically, you have to wrap your await client.SendAsync() in a try-catch-block and catch the DicomAssociationRequestTimeOutException instead of only adding a handler to the event. You should catch all exceptions, also the SocketException.
You also can cancel requests. You can pass a |
Expected behavior
To allow the client to set the association requested time duration if association fails and to abort the association and client.
I am using C-Echo/C-store SCP program codes to test the Server with particular AET, IP address and Port #.
After providing wrong AET/IP address / Port # for server association request must get terminated after Association Request Timed Outset duration .
Actual behavior
I am not able to set the association requested time duration.
Please help me with this for implementation as I am still learning c# and so not able to get the syntax
Steps to reproduce the behavior
DicomCEchoRequest CEchoRequest = new DicomCEchoRequest();
fo-dicom version and OS/platform
fo-dicom : 5.1.1
OS : Windows
The text was updated successfully, but these errors were encountered: