From e27a68317093b1c2b531b899542a2683e198c21d Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Wed, 29 Sep 2021 12:41:51 +0200 Subject: [PATCH] Added stub functions for creating a new Server instance --- source/app.d | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/source/app.d b/source/app.d index ab485c1..52683dd 100644 --- a/source/app.d +++ b/source/app.d @@ -1,6 +1,7 @@ import std.stdio; import std.json; import std.exception; +import dnetd.server; void main(string[] args) { @@ -36,13 +37,28 @@ private void startServer(string configPath) try { - configJSON= parseJSON(configFileData); + configJSON = parseJSON(configFileData); } catch(JSONException) { writeln("config parse error"); return; } + + /* Get server config */ + ServerConfig config = getServerConfig(configJSON); + + /* Create a new Server */ + Server server = new Server(config); +} + +private ServerConfig getServerConfig(JSONValue jsonConfig) +{ + /* TODO: Implement me */ + ServerConfig config; + + + return config; } private string readConfig(string configPath)