CStoreSCP - How to raise an event on received CStore request? #1946
-
Hi, Instead of writing a DICOM file on every received C-STORE request I simply want to extract some data from the incoming data set and raise an event for registered listeners. But when creating the SCP from my main code as suggested in the sample
I have no access to the actual Is there any reference implementation or hint how to do this? Thanks a lot. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
it is because of the nature how tcp-connections work. the server is waiting in the background-task for incomming requests. and there might be several connections at the same time. |
Beta Was this translation helpful? Give feedback.
it is because of the nature how tcp-connections work. the server is waiting in the background-task for incomming requests. and there might be several connections at the same time.
So the instances of
StoreScp
will be created by the server whenever a new connection was established.So you have to design it the other way round: you need to have a public available method that implement the event-handler. And then in the
StoreScp
class in the methodOnCStoreRequest
the instance will invoke this method.