lamyj / odil

Odil is a C++11 library for the DICOM standard
Other
85 stars 21 forks source link

Support multiple calls to association.receive_association() #80

Closed akronbook closed 3 years ago

akronbook commented 3 years ago

When trying store.cpp in the sample folder, I noticed that association.receive_association() can be called once only. A second call will lead to "Address already in use" exception.

How to support multiple calls to association.receive_association() against the same TCP port? This should be a very common user scenario. I thought "boost::asio::socket_base::reuse_address option(true);" in Transport.cpp should allow multiple associations, thus I was surprised that store.cpp can only be called by a single user.

lamyj commented 3 years ago

The current network design of Odil is sadly not multiplexed (incidentally, this is the major reason that the version numbers are still 0.x). The multi-thread server scenario that you describe requires the asynchronous features of boost::asio, and is thus a major redesign of the networking part of Odil which I have not had time to work on yet.