static void Main(string[] args) { _sargs = new ServerArgs(args); _server = new ServerBase(_sargs.ListenPort, _sargs.DBString); _server.TaskProcessor = new GlobalTaskProcessor(); _server.DatabaseSetup(); //#if DEBUG LogThread.AlwaysPrintToConsole = true; //#endif _webServer = new WebServer(null, "http://127.0.0.1:8080/purchase/", "http://127.0.0.1:8080/checkout/"); _webServer.Run(); Marketplace m = new Marketplace(_server); _server.TaskProcessor.AddTask(new GlobalTask(GlobalTask.GlobalType.Products_Fetch)); _server.ListenThread.OnConnectionAccepted += new EventHandler <SocketArg>(lt_OnConnectionAccepted); _server.Run(); }
public Marketplace(ServerBase server) { _instance = this; _server = server; }