Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions uhttpsharp/Listeners/IHttpListener.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
using System.Threading.Tasks;
using System;
using System.Threading.Tasks;
using uhttpsharp.Clients;

namespace uhttpsharp.Listeners
{
public interface IHttpListener
public interface IHttpListener: IDisposable
{

Task<IClient> GetClient();

}
}
}
7 changes: 6 additions & 1 deletion uhttpsharp/Listeners/SslListenerDecoerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,10 @@ public async Task<IClient> GetClient()
{
return new ClientSslDecorator(await _child.GetClient().ConfigureAwait(false), _certificate);
}

public void Dispose()
{
_child.Dispose();
}
}
}
}
5 changes: 5 additions & 0 deletions uhttpsharp/Listeners/TcpListenerAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,10 @@ public async Task<IClient> GetClient()
{
return new TcpClientAdapter(await _listener.AcceptTcpClientAsync().ConfigureAwait(false));
}

public void Dispose()
{
_listener.Stop();
}
}
}