Add Flypaper solution skeleton with HTTP tarpit, SQLite event log and tests
This commit is contained in:
1 parent
20314268c6
commit
f9161f48e7
55 files changed
+1331
No files matched your search
@@ -0,0 +1,15 @@
|
||||
using Flypaper.Core;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Flypaper.Http;
|
||||
|
||||
internal sealed class HttpTrapChannel(TrapSession session, HttpResponse response) : ITrapChannel
|
||||
{
|
||||
public TrapSession Session => session;
|
||||
|
||||
public async ValueTask WriteAsync(ReadOnlyMemory<byte> data, CancellationToken ct)
|
||||
{
|
||||
await response.Body.WriteAsync(data, ct);
|
||||
await response.Body.FlushAsync(ct);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user