26class InterprocessConnectionServer;
74 uint32 magicMessageHeaderNumber = 0xf2b49e2c);
91 bool connectToSocket (
const String& hostName,
93 int timeOutMillisecs);
107 bool connectToPipe (
const String& pipeName,
int pipeReceiveMessageTimeoutMs);
121 bool createPipe (
const String& pipeName,
int pipeReceiveMessageTimeoutMs,
bool mustNotExist =
false);
134 void disconnect (
int timeoutMs = -1, Notify notify = Notify::yes);
137 bool isConnected()
const;
148 String getConnectedHostName()
const;
197 bool callbackConnectionState =
false;
198 const bool useMessageThread;
199 const uint32 magicMessageHeader;
200 int pipeReceiveMessageTimeout = -1;
206 void deletePipeAndSocket();
207 void connectionMadeInt();
208 void connectionLostInt();
210 bool readNextMessage();
211 int readData (
void*,
int);
221 int writeData (
void*,
int);
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).
Notify
Whether the disconnect call should trigger callbacks.
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 critical section that allows multiple simultaneous readers.
A wrapper for a streaming (TCP) socket.
unsigned int uint32
A platform-independent 32-bit unsigned integer type.