public void SetReportStateFunc(reportStateFuncType userReportStateFunc) { reportStateFunc = userReportStateFunc; if (reportStateFunc != null) { reportStateFunc(curState); } }
public HttpServer(int initial_port = defaultPort, string initial_rootdir = defaultRootDir) { evShutdown = new AutoResetEvent(false); evSettings = new AutoResetEvent(true); evStart = new AutoResetEvent(false); evStop = new AutoResetEvent(false); evServed = new AutoResetEvent(false); rootDirMutex = new Mutex(false); requestCount = 0; port = initial_port; rootDir = initial_rootdir; curState = State.Inactive; logFunc = null; reportStateFunc = null; serverThread = null; }