Receive command Timeout

All other questions regarding DCMTK

Moderator: Moderator Team

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

Receive command Timeout

#1 Post by kattabomane » Fri, 2012-04-06, 12:09

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: 41
Joined: Tue, 2005-02-01, 22:53

use of non blocking

#2 Post by kattabomane » Fri, 2012-04-06, 15:36

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: No registered users and 1 guest