cello
JUCE ValueTrees for Humans
Loading...
Searching...
No Matches
cello::IpcServer Class Reference
Inheritance diagram for cello::IpcServer:

Public Member Functions

 IpcServer (Object &sync, IpcClient::UpdateType updateType, const juce::String &statePath, Object *state=nullptr)
 
bool startServer (int portNumber, const juce::String &bindAddress=juce::String())
 Launch the thread that starts listening for incoming socket connections.
 
bool stopServer ()
 Stop the server.
 

Protected Member Functions

juce::InterprocessConnection * createConnectionObject () override
 When we get a connection, the base server class will call this so that we can create and return an instance of the connection type that we want to use. We'll maintain ownership of the object created here in the server's connections vector.
 

Member Function Documentation

◆ createConnectionObject()

juce::InterprocessConnection * cello::IpcServer::createConnectionObject ( )
overrideprotected

When we get a connection, the base server class will call this so that we can create and return an instance of the connection type that we want to use. We'll maintain ownership of the object created here in the server's connections vector.

Returns
juce::InterprocessConnection* a non-owning pointer to the client connection object that was created; the base server class will use that pointer to complete the setup of the client connection object.

◆ startServer()

bool cello::IpcServer::startServer ( int portNumber,
const juce::String & bindAddress = juce::String () )

Launch the thread that starts listening for incoming socket connections.

Parameters
portNumberport number to listen on.
bindAddressaddress to bind to, empty string listens on all addresses for this machine.
Returns
bool true if the server is running (or was already running).

◆ stopServer()

bool cello::IpcServer::stopServer ( )

Stop the server.

Returns
bool true if the server was stopped (or was not running)

The documentation for this class was generated from the following files: