mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-14 20:40:03 +02:00
Encapsulate our VST3 message handling pattern
Similarly to how how we do it in `EventHandler`.
This commit is contained in:
@@ -412,14 +412,10 @@ class SocketHandler {
|
||||
*
|
||||
* @tparam Thread The thread implementation to use. On the Linux side this
|
||||
* should be `std::jthread` and on the Wine side this should be `Win32Thread`.
|
||||
*
|
||||
* TODO: Once we have figured out a way to encapsulate the usage patterns in
|
||||
* `Vst3Sockets` we should make the constructor, `send()` and
|
||||
* `receive_multi()` protected again to avoid weirdness
|
||||
*/
|
||||
template <typename Thread>
|
||||
class AdHocSocketHandler {
|
||||
public:
|
||||
protected:
|
||||
/**
|
||||
* Sets up a single primary socket. The sockets won't be active until
|
||||
* `connect()` gets called.
|
||||
@@ -445,6 +441,7 @@ class AdHocSocketHandler {
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
/**
|
||||
* Depending on the value of the `listen` argument passed to the
|
||||
* constructor, either accept connections made to the sockets on the Linux
|
||||
@@ -477,6 +474,7 @@ class AdHocSocketHandler {
|
||||
socket.close();
|
||||
}
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Serialize and send an event over a socket. This is used for both the host
|
||||
* -> plugin 'dispatch' events and the plugin -> host 'audioMaster' host
|
||||
|
||||
Reference in New Issue
Block a user