mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added some methods IPAddress::getAllAddresses(), IPAddress::getLocalAddress(), MACAddress::getAllAddresses()
This commit is contained in:
parent
d9fa1c4602
commit
ccbaf89f0e
10 changed files with 77 additions and 61 deletions
|
|
@ -28,16 +28,9 @@
|
|||
|
||||
namespace
|
||||
{
|
||||
String getIPAddress()
|
||||
{
|
||||
Array<IPAddress> addresses;
|
||||
IPAddress::findAllAddresses (addresses);
|
||||
return addresses[1].toString();
|
||||
}
|
||||
|
||||
String getBroadcastIPAddress()
|
||||
{
|
||||
return getIPAddress().upToLastOccurrenceOf (".", false, false) + ".255";
|
||||
return IPAddress::getLocalAddress().toString().upToLastOccurrenceOf (".", false, false) + ".255";
|
||||
}
|
||||
|
||||
static const int masterPortNumber = 9001; // the UDP port the master sends on / the clients receive.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue