public void Start(int port, ProcessHttpRequestDel onRequest, bool needAuthentication) { this.onRequest = onRequest; listener.Prefixes.Add(string.Format("http://*:{0}/", port)); if (needAuthentication) listener.AuthenticationSchemes = AuthenticationSchemes.Negotiate; listener.Start(); stopFlag = false; workThread = new Thread(ThreadLoop); workThread.Start(); }
public void Start(int port, ProcessHttpRequestDel onRequest, bool needAuthentication) { this.onRequest = onRequest; listener.Prefixes.Add(string.Format("http://*:{0}/", port)); if (needAuthentication) { listener.AuthenticationSchemes = AuthenticationSchemes.Negotiate; } listener.Start(); stopFlag = false; workThread = new Thread(ThreadLoop); workThread.Start(); }