mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Add possibility for an InterprocessConnectionServer to bind to a certain network address
This commit is contained in:
parent
6810791645
commit
5e0d3fdcbe
2 changed files with 10 additions and 3 deletions
|
|
@ -33,13 +33,13 @@ InterprocessConnectionServer::~InterprocessConnectionServer()
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
bool InterprocessConnectionServer::beginWaitingForSocket (const int portNumber)
|
||||
bool InterprocessConnectionServer::beginWaitingForSocket (const int portNumber, const String& bindAddress)
|
||||
{
|
||||
stop();
|
||||
|
||||
socket = new StreamingSocket();
|
||||
|
||||
if (socket->createListener (portNumber))
|
||||
if (socket->createListener (portNumber, bindAddress))
|
||||
{
|
||||
startThread();
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -57,9 +57,16 @@ public:
|
|||
|
||||
Use stop() to stop the thread running.
|
||||
|
||||
@param portNumber The port on which the server will receive
|
||||
connections
|
||||
@param bindAddress The address on which the server will listen
|
||||
for connections. An empty string indicates
|
||||
that it should listen on all addresses
|
||||
assigned to this machine.
|
||||
|
||||
@see createConnectionObject, stop
|
||||
*/
|
||||
bool beginWaitingForSocket (int portNumber);
|
||||
bool beginWaitingForSocket (int portNumber, const String& bindAddress = String());
|
||||
|
||||
/** Terminates the listener thread, if it's active.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue