30class InterprocessConnectionServer;
92 bool connectToSocket (
const String& hostName,
128 bool isConnected()
const;
139 String getConnectedHostName()
const;
186 std::unique_ptr<StreamingSocket> socket;
187 std::unique_ptr<NamedPipe> pipe;
188 bool callbackConnectionState =
false;
189 const bool useMessageThread;
190 const uint32 magicMessageHeader;
191 int pipeReceiveMessageTimeout = -1;
196 void deletePipeAndSocket();
197 void connectionMadeInt();
198 void connectionLostInt();
200 bool readNextMessage();
201 int readData (
void*,
int);
204 std::unique_ptr<ConnectionThread> thread;
205 std::atomic<bool> threadIsRunning {
false };
208 int writeData (
void*,
int);
Holds a resizable array of primitive or copy-by-value objects.
An object that waits for client sockets to connect to a port on this host, and creates InterprocessCo...
Manages a simple two-way messaging connection to another process, using either a socket or a named pi...
virtual void connectionMade()=0
Called when the connection is first connected.
virtual void messageReceived(const MemoryBlock &message)=0
Called when a message arrives.
StreamingSocket * getSocket() const noexcept
Returns the socket that this connection is using (or nullptr if it uses a pipe).
virtual void connectionLost()=0
Called when the connection is broken.
NamedPipe * getPipe() const noexcept
Returns the pipe that this connection is using (or nullptr if it uses a socket).
A class to hold a resizable block of raw data.
A cross-process pipe that can have data written to and read from it.
A wrapper for a streaming (TCP) socket.
#define JUCE_API
This macro is added to all JUCE public class declarations.