Allow disabling ad-hoc socket spawning

We'll need this for handling `IAudioProcessor` method calls in VST3. We
basically want a `Vst3MessageHandler` per `IAudioProcessor` instance,
but without the additional socket spawning or extra thread.
This commit is contained in:
Robbert van der Helm
2020-12-21 15:45:47 +01:00
parent ecd0de9d7d
commit 415c1b5683
3 changed files with 100 additions and 65 deletions
+2 -2
View File
@@ -106,7 +106,7 @@ class DefaultDataConverter {
* should be `std::jthread` and on the Wine side this should be `Win32Thread`.
*/
template <typename Thread>
class EventHandler : public AdHocSocketHandler<Thread> {
class EventHandler : public AdHocSocketHandler<Thread, true> {
public:
/**
* Sets up a single main socket for this type of events. The sockets won't
@@ -125,7 +125,7 @@ class EventHandler : public AdHocSocketHandler<Thread> {
EventHandler(boost::asio::io_context& io_context,
boost::asio::local::stream_protocol::endpoint endpoint,
bool listen)
: AdHocSocketHandler<Thread>(io_context, endpoint, listen) {}
: AdHocSocketHandler<Thread, true>(io_context, endpoint, listen) {}
/**
* Serialize and send an event over a socket. This is used for both the host