Mercurial > hg > orthanc
comparison Core/DicomNetworking/TimeoutDicomConnectionManager.h @ 3863:9973d10bc5c4 transcoding
switch to DicomStoreUserConnection in Lua routing, C-MOVE handler and straight C-STORE
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 27 Apr 2020 18:16:20 +0200 |
parents | 6498739a3c3c |
children |
comparison
equal
deleted
inserted
replaced
3862:594263db316a | 3863:9973d10bc5c4 |
---|---|
41 # error The macro ORTHANC_ENABLE_DCMTK_NETWORKING must be 1 to use this file | 41 # error The macro ORTHANC_ENABLE_DCMTK_NETWORKING must be 1 to use this file |
42 #endif | 42 #endif |
43 | 43 |
44 | 44 |
45 #include "../Compatibility.h" | 45 #include "../Compatibility.h" |
46 #include "DicomUserConnection.h" | 46 #include "DicomStoreUserConnection.h" |
47 | 47 |
48 #include <boost/date_time/posix_time/posix_time.hpp> | 48 #include <boost/date_time/posix_time/posix_time.hpp> |
49 #include <boost/thread/mutex.hpp> | 49 #include <boost/thread/mutex.hpp> |
50 | 50 |
51 namespace Orthanc | 51 namespace Orthanc |
54 * This class corresponds to a singleton to a DICOM SCU connection. | 54 * This class corresponds to a singleton to a DICOM SCU connection. |
55 **/ | 55 **/ |
56 class TimeoutDicomConnectionManager : public boost::noncopyable | 56 class TimeoutDicomConnectionManager : public boost::noncopyable |
57 { | 57 { |
58 private: | 58 private: |
59 boost::mutex mutex_; | 59 boost::mutex mutex_; |
60 std::unique_ptr<DicomUserConnection> connection_; | 60 std::unique_ptr<DicomStoreUserConnection> connection_; |
61 boost::posix_time::ptime lastUse_; | 61 boost::posix_time::ptime lastUse_; |
62 boost::posix_time::time_duration timeout_; | 62 boost::posix_time::time_duration timeout_; |
63 | 63 |
64 // Mutex must be locked | 64 // Mutex must be locked |
65 void TouchInternal(); | 65 void TouchInternal(); |
66 | 66 |
67 // Mutex must be locked | 67 // Mutex must be locked |
83 const std::string& localAet, | 83 const std::string& localAet, |
84 const RemoteModalityParameters& remote); | 84 const RemoteModalityParameters& remote); |
85 | 85 |
86 ~Lock(); | 86 ~Lock(); |
87 | 87 |
88 DicomUserConnection& GetConnection(); | 88 DicomStoreUserConnection& GetConnection(); |
89 }; | 89 }; |
90 | 90 |
91 TimeoutDicomConnectionManager() : | 91 TimeoutDicomConnectionManager() : |
92 timeout_(boost::posix_time::milliseconds(1000)) | 92 timeout_(boost::posix_time::milliseconds(1000)) |
93 { | 93 { |