Order of construction details (WIP)
This commit is contained in:
parent
c7398586ea
commit
c23214b186
|
@ -27,8 +27,8 @@ void main()
|
|||
ButterflyListener[] listeners = constructListeners(config["listeners"]);
|
||||
|
||||
/* Start the server */
|
||||
Address address = parseAddress(config["address"].str(), to!(ushort)(config["port"].str()));
|
||||
ButterflyServer server = new ButterflyServer(listeners, config["domain"].str());
|
||||
//Address address = parseAddress(config["address"].str(), to!(ushort)(config["port"].str()));
|
||||
ButterflyServer server = new ButterflyServer(listeners);
|
||||
}
|
||||
|
||||
private ButterflyListener[] constructListeners(JSONValue listenersBlock)
|
||||
|
@ -45,7 +45,7 @@ private ButterflyListener[] constructListeners(JSONValue listenersBlock)
|
|||
{
|
||||
writeln("Constructing listener \"" ~ listener ~ "\" ...");
|
||||
|
||||
|
||||
|
||||
|
||||
writeln("Listener \"" ~ listener ~ "\"constructed");
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ public abstract class ButterflyListener : Thread
|
|||
private ButterflyServer server;
|
||||
private string listenerName;
|
||||
private JSONValue config;
|
||||
private string domain;
|
||||
|
||||
this(string listenerName, JSONValue config)
|
||||
{
|
||||
|
@ -32,6 +33,11 @@ public abstract class ButterflyListener : Thread
|
|||
return listenerName;
|
||||
}
|
||||
|
||||
public string getDomain()
|
||||
{
|
||||
return domain;
|
||||
}
|
||||
|
||||
public JSONValue getConfig()
|
||||
{
|
||||
return config;
|
||||
|
|
|
@ -27,7 +27,7 @@ public final class ButterflyServer
|
|||
/* TODO: Server domain */
|
||||
public string domain;
|
||||
|
||||
this(ButterflyListener[] listeners, string domain)
|
||||
this(ButterflyListener[] listeners)
|
||||
{
|
||||
/**
|
||||
* Create the needed directories (if not already present)
|
||||
|
|
Loading…
Reference in New Issue