Quick start
Up and running in five minutes.
Install the package, register a module, host the pipe, and send a request — all from a single console app.
Prerequisites
- .NET 10.0 SDK or later
- Windows, Linux, or macOS — .NET’s
NamedPipeStreamuses native named pipes on Windows and Unix domain sockets on Linux and macOS, so client and server code is identical across platforms.
Install
Create a new console project and add the NuGet package:
dotnet new console -n MyArgusService
cd MyArgusService
dotnet add package ArgusTransfer
The three steps
Define a module
A module is a class that registers routes against the framework’s route builder. Implement IArgusModule, map a verb + path to a handler, and you’re done:
using System.Threading.Tasks;
using ArgusTransfer.Protocol;
using ArgusTransfer.Routing;
public class HelloModule : IArgusModule
{
public void AddRoutes(IArgusRouteBuilder app)
{
app.MapGet("/hello", context =>
{
context.Response = new ArgusResponse
{
StatusCode = ArgusStatusCode.Ok,
Body = "Hello from ArgusTransfer!"
};
return Task.CompletedTask;
});
}
}
Host the pipe
Wire everything up in Program.cs. AddArgusModules() discovers your HelloModule automatically, AddArgusPipeHost opens the named pipe, and AddArgusClient registers a client for the same pipe so you can call yourself for the demo:
using ArgusTransfer.Extensions;
using ArgusTransfer.Routing;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
Host.CreateDefaultBuilder(args)
.ConfigureServices(services =>
{
services.AddArgusModules();
services.AddArgusPipeHost(o => o.PipeName = "demo");
services.AddArgusClient("demo");
services.AddHostedService<DemoClientService>();
})
.Build()
.Run();
Call from a client
The client uses verb-named methods that mirror the module side — GetAsync, PostAsync, PutAsync, etc. — and gives you back a typed ArgusResponse:
using ArgusTransfer.Client;
using Microsoft.Extensions.Hosting;
public class DemoClientService : BackgroundService
{
private readonly IArgusClient client;
private readonly IHostApplicationLifetime lifetime;
public DemoClientService(IArgusClient client, IHostApplicationLifetime lifetime)
{
this.client = client;
this.lifetime = lifetime;
}
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
await Task.Delay(1000, stoppingToken);
var response = await this.client.GetAsync("/hello", cancellationToken: stoppingToken);
Console.WriteLine($"Status: {(int)response.StatusCode} {response.StatusCode}");
Console.WriteLine($"Body: {response.Body}");
this.lifetime.StopApplication();
}
}
Run it with dotnet run:
Status: 200 Ok
Body: Hello from ArgusTransfer!
What goes over the wire
ARGUS/1.0 is a text protocol modeled on HTTP/1.1. A request line, headers, blank line, body —
transmitted over a named pipe instead of a TCP socket. Every exchange carries an X-Correlation-Token
so clients can match responses to their originating requests.
Request
POST /sampleitems ARGUS/1.0
X-Correlation-Token: a1b2c3d4-e5f6-7890-abcd-ef1234567890
X-Timestamp: 2026-03-28T10:30:00.0000000Z
Content-Type: application/json
Content-Length: 42
{"name":"Widget","description":"A widget"}
Response
ARGUS/1.0 201 Created
X-Correlation-Token: a1b2c3d4-e5f6-7890-abcd-ef1234567890
X-Timestamp: 2026-03-28T10:30:00.1234567Z
Content-Type: application/json
Content-Length: 89
{"id":"f7e6d5c4-b3a2-1098-7654-321fedcba098","name":"Widget","description":"A widget"}
Learn more
The wiki has the full reference — protocol details, configuration, middleware patterns, and troubleshooting.
Architecture & Protocol
How a request flows through the framework, end-to-end.
Read →Routing & Modules
Route templates, parameter constraints, CRUD patterns.
Read →Client Usage
Query parameters, streaming bodies, timeouts, exceptions.
Read →Server Configuration
Pipe options, concurrency, graceful shutdown.
Read →Middleware
Logging, authorization, custom pipeline stages.
Read →Wire Format Reference
Verbs, status codes, headers, chunked encoding.
Read →Serialization
Custom body serializers and content-type negotiation.
Read →Troubleshooting
Common errors and how to resolve them.
Read →