Receive command Timeout

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
kattabomane
Posts: 43
Joined: Tue, 2005-02-01, 22:53

Receive command Timeout

#1 Post by kattabomane »

Hello,

We are using the following for receiving a command and processing c find requests.

Code: Select all

...

while(cond.good())
{
    cond = DIMSE_receivedCommand(assoc, DIMSE_BLOCKING, 0, & presID, &msg, NULL);

    if(cond.good()
    {
    ....
     }

}
Time to time some modalities send command and the DIMSE_receivedCommand remains waiting.

In order to avoid this sort of blocking, can i set a tiemout like the following :

cond = DIMSE_receivedCommand(assoc, DIMSE_BLOCKING, 5000, & presID, &msg, NULL);

Thanks for your help

kattabomane
Posts: 43
Joined: Tue, 2005-02-01, 22:53

use of non blocking

#2 Post by kattabomane »

Hello,

After digging a little bit, found that we can use the non blocking with a timeout.

Code: Select all

DIMSE_receiveCommand(assoc, DIMSE_NONBLOCKING, 5000, & presID, &msg, NULL); 
Is this approach correct ?

Thanks

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest