mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-13 20:09:59 +02:00
💥 Encapsulate and rework all socket logic
This is a pretty huge change that will be important for being able to handle nested or mutually recursive `dispatch()` and `audioMaster()` calls. This sadly all had to be done in a single commit, so here's a summary: - `src/common/sockets.h:Sockets` contains all sockets on both the plugin and the Wine host side, and is used to both listen on and connect to the sockets. - Sockets and other temporary files respect `$XDG_RUNTIME_DIR` instead of being dumped in `/tmp`. - All sockets now have a unique endpoint in `/run/user/<uid>/yabridge-<plugin_name>-<random_id>/`. This is important for when we want to have multiple socket connections for handling `dispatch()` and `audioMaster()`. - Because of the above, we no longer clean up the socket endpoint files after the connection gets established during initialization. Instead we'll remove the socket base directory when shutting down.
This commit is contained in:
@@ -16,6 +16,17 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __WINE__
|
||||
#include "../wine-host/boost-fix.h"
|
||||
#endif
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
/**
|
||||
* Return the path to the directory for story temporary files. This will be
|
||||
* `$XDG_RUNTIME_DIR` if set, and `/tmp` otherwise.
|
||||
*/
|
||||
boost::filesystem::path get_temporary_directory();
|
||||
|
||||
/**
|
||||
* Set the scheduling policy to `SCHED_FIFO` with priority 10 for this process.
|
||||
* We explicitly don't do this for wineserver itself since from my testing that
|
||||
|
||||
Reference in New Issue
Block a user