AssuanLibrary 2.0.1
See the version list below for details.
dotnet add package AssuanLibrary --version 2.0.1
NuGet\Install-Package AssuanLibrary -Version 2.0.1
<PackageReference Include="AssuanLibrary" Version="2.0.1" />
<PackageVersion Include="AssuanLibrary" Version="2.0.1" />
<PackageReference Include="AssuanLibrary" />
paket add AssuanLibrary --version 2.0.1
#r "nuget: AssuanLibrary, 2.0.1"
#:package AssuanLibrary@2.0.1
#addin nuget:?package=AssuanLibrary&version=2.0.1
#tool nuget:?package=AssuanLibrary&version=2.0.1
AssuanLibrary
Build Assuan clients and servers in .NET 10 without treating protocol data as text. AssuanLibrary provides bounded, binary-safe protocol handling, asynchronous transactions, and transport abstractions for applications that speak the Assuan protocol, including integrations with existing GnuPG agents.
What the package includes
- A serial client API for commands, streaming responses, inquiries, and opt-in bounded response collection.
- Server sessions with typed handlers, per-connection state, hooks, and supervised shutdown.
- TCP, Unix domain socket, Windows named-pipe, and custom
Streamtransports; discovery and connection to an existing GnuPG agent. - Canonical binary S-expression parsing and writing, plus an incremental handler generator bundled in the same package. DI and Logging helpers are generated only when the consumer references the corresponding Microsoft.Extensions packages.
Install
dotnet add package AssuanLibrary --version 2.0.1
The package targets net10.0. Version 2.0 replaces the published 1.x API; 1.x code and examples are not source-compatible.
Send a command
This example connects to an Assuan TCP server listening on loopback port 9000 that implements ECHO. It reads decoded data events without retaining borrowed buffers:
using System;
using System.Net;
using AssuanLibrary.Client;
await using var client = await AssuanClient.ConnectAsync(
new IPEndPoint(IPAddress.Loopback, 9000));
await using var transaction = await client.CommandAsync("ECHO", "hello"u8.ToArray());
while (await transaction.ReadNextAsync() is { } response) {
using (response) {
if (response.Kind == ClientEventKind.Data)
Console.WriteLine(Convert.ToHexString(response.PayloadBytes.Span));
}
}
transaction.Finish();
One client connection handles one transaction at a time. Dispose each event before reading the next; call Finish() after the final response. TCP does not authenticate the peer—apply an authentication policy for services that need one. When connecting to a discovered Windows GnuPG agent, use the resolved endpoint's connection method so its native nonce is sent before the greeting.
Learn more
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on AssuanLibrary:
| Package | Downloads |
|---|---|
|
AssuanLibrary.Extensions.DependencyInjection
A .NET library for interacting with the Assuan protocol. |
GitHub repositories
This package is not used by any popular GitHub repositories.