Multible clients to one SCP

93 views
Skip to first unread message

Nick Perkins

unread,
Aug 16, 2017, 2:40:26 PM8/16/17
to Fellow Oak DICOM
Hello,

I am new to DICOM and Fellow Oak and am trying to set up a small SCP server with a few clients. Currently one client functions fine but as soon as I try to add a second client it either waits for ever on client 2's first send request or it makes client 1 wait forever on a send request. Or they will both run extremely slow and evently both just stop working and get hung up on a send. I have tried running this test on a single machine and a few networked laptops. I am not sure what I am doing wrong. I made sure release a client when I am done using it.  

Any help would be greatly appreciated
An example of a send request is:
 client.NegotiateAysncOps(4,4);
 DicomCFindRequest cfr = DicomCFindRequest.CreateStudyQuery(patientId);
            cfr.OnResponseReceived += (DicomCFindRequest rq, DicomCFindResponse rp) => {
                if (rp.HasDataset) {
                    string StudyID = rp.Dataset.Get<string>(DicomTag.StudyID);
                    string StudyInstanceID = rp.Dataset.Get<string>(DicomTag.StudyInstanceUID);
                    Program.logger.Debug($"CFind response received. StudyID: {StudyID} StudyInstanceID: {StudyInstanceID}");
                    result.Add(rp.Dataset);
                } else {
                    Program.logger.Debug($"CFind response received without dataset. Status: {rp.Status}");
                }
            };
            client.AddRequest(cfr);
            client.WaitForAssociation();
            client.Send(Properties.Settings.Default.SCP_IP, Properties.Settings.Default.SCP_PORT, false, Program.IP, Properties.Settings.Default.SCP_AE);
            client.Release();


Anders Gustafsson Cureos AB

unread,
Aug 25, 2017, 3:06:01 AM8/25/17
to Fellow Oak DICOM
Hi Nick,

Which fo-dicom version are you using? First and foremost, avoid calling .WaitForAssociation(). This method only waits for a connection to be established, and this does not happen before Send(Async) is called. WaitForAssociation() is mainly a legacy from the version 1.x (pre-Task) era and should probably be declared obsolete for future removal from the API.

What happens if you remove the WaitForAssociation call?

Regards,
Anders @ Cureos

Reply all
Reply to author
Forward
0 new messages