| class HelperPluginHost; | |
| class HelperIPC | |
| { | |
| public: | |
| HelperIPC(int parentPid, HelperPluginHost& host); | |
| ~HelperIPC(); | |
| bool connect(); | |
| void disconnect(); | |
| void sendReady(); | |
| void sendGuiReady(const juce::String& portName, int width, int height); | |
| void sendGuiResized(int width, int height); | |
| void sendParamChanged(int index, float value); | |
| void sendMessage(const juce::String& jsonStr); | |
| private: | |
| void listenLoop(); | |
| void handleMessage(const juce::String& message); | |
| int parentPid; | |
| HelperPluginHost& host; | |
| int socketFd = -1; | |
| std::thread listenThread; | |
| std::atomic<bool> running{false}; | |
| }; | |