AssuanLibrary 2.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package AssuanLibrary --version 2.0.1
                    
NuGet\Install-Package AssuanLibrary -Version 2.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AssuanLibrary" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AssuanLibrary" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="AssuanLibrary" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AssuanLibrary --version 2.0.1
                    
#r "nuget: AssuanLibrary, 2.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AssuanLibrary@2.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AssuanLibrary&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=AssuanLibrary&version=2.0.1
                    
Install as a Cake Tool

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 Stream transports; 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.

Version Downloads Last Updated
2.1.0 104 11/12/2026
2.0.1 199 10/12/2026
2.0.0 160 10/10/2026
1.2.0 134 8/15/2026
1.1.1 157 5/25/2026
1.0.2 174 1/31/2026
1.0.0 347 1/30/2026