Return all addresses requested to bind to

This commit is contained in:
Tristan B. Kildaire 2020-12-20 17:20:46 +02:00
parent 325b37c5da
commit 04ee591936
1 changed files with 11 additions and 3 deletions

View File

@ -125,10 +125,18 @@ public final class DGeneralConfig
return motd;
}
public Address getAddress()
public Address[] getAddresses()
{
/* TODO: Add multi address support later */
return parseAddress(addresses[0], port);
/* Address(es) to listen on */
Address[] listenAddresses;
/* Create the addresses */
foreach(string address; addresses)
{
listenAddresses ~= parseAddress(address, port);
}
return listenAddresses;
}
}