private ApiServer(IPConf conf) { HttpServer = new HttpListener(); ipAddr = conf.ServerIp; _apiGateway = String.Format("http://{0}:8000/", ipAddr); HttpServer.Prefixes.Add(_apiGateway); _running = false; Mutex = new Mutex(false, "Api"); }
public static ApiServer Create(IPConf conf) { if (!HttpListener.IsSupported) { #if DEBUG Log.Error("HttpListener is not supported in your current operating system."); #endif return(null); } else { return(new ApiServer(conf)); } }