wasSharpNET

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 14  →  ?path2? @ 15
/Network/HTTP/HTTPServer.cs
@@ -11,11 +11,11 @@
 
namespace wasSharpNET.Network.HTTP
{
public abstract class HTTPServer
public abstract class HTTPServer : IDisposable
{
private int activeRequests;
 
private readonly HttpListener HTTPListener = new HttpListener()
private HttpListener HTTPListener = new HttpListener()
{
AuthenticationSchemes = AuthenticationSchemes.None
};
@@ -22,8 +22,8 @@
 
private int processedRequests;
 
private readonly AutoResetEvent StopServerEvent = new AutoResetEvent(false);
private readonly AutoResetEvent ServerStoppedEvent = new AutoResetEvent(false);
private AutoResetEvent StopServerEvent = new AutoResetEvent(false);
private AutoResetEvent ServerStoppedEvent = new AutoResetEvent(false);
 
public AuthenticationSchemes AuthenticationSchemes
{
@@ -122,6 +122,18 @@
}
}
 
public void Dispose()
{
Stop();
 
HTTPListener = null;
StopServerEvent?.Dispose();
ServerStoppedEvent?.Dispose();
 
StopServerEvent = null;
ServerStoppedEvent = null;
}
 
private class HTTPServerCallbackState
{
public HTTPServerCallbackState(HttpListener listener)
/Properties/AssemblyInfo.cs
@@ -37,4 +37,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
 
[assembly: AssemblyVersion("1.9.*")]
[assembly: AssemblyVersion("1.10.*")]