TelnetNegotiationCore 4.5.3
dotnet add package TelnetNegotiationCore --version 4.5.3
NuGet\Install-Package TelnetNegotiationCore -Version 4.5.3
<PackageReference Include="TelnetNegotiationCore" Version="4.5.3" />
<PackageVersion Include="TelnetNegotiationCore" Version="4.5.3" />
<PackageReference Include="TelnetNegotiationCore" />
paket add TelnetNegotiationCore --version 4.5.3
#r "nuget: TelnetNegotiationCore, 4.5.3"
#:package TelnetNegotiationCore@4.5.3
#addin nuget:?package=TelnetNegotiationCore&version=4.5.3
#tool nuget:?package=TelnetNegotiationCore&version=4.5.3
<p align="center"> <img src="docs/images/telnet-negotiation-core-header.png" alt="Telnet Negotiation Core — a terminal and a MUD exchange negotiated capabilities" width="100%"> </p>
<p align="center"> <a href="https://www.nuget.org/packages/TelnetNegotiationCore"><img alt="NuGet version" src="https://img.shields.io/nuget/v/TelnetNegotiationCore?style=flat-square&logo=nuget&logoColor=white&color=1683b5"></a> <a href="https://www.nuget.org/packages/TelnetNegotiationCore"><img alt="NuGet downloads" src="https://img.shields.io/nuget/dt/TelnetNegotiationCore?style=flat-square&color=1683b5"></a> <a href="https://github.com/HarryCordewener/TelnetNegotiationCore/actions/workflows/dotnet.yml"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/HarryCordewener/TelnetNegotiationCore/dotnet.yml?branch=main&style=flat-square&label=build"></a> <a href="https://scorecard.dev/viewer/?uri=github.com/HarryCordewener/TelnetNegotiationCore"><img alt="OpenSSF Scorecard" src="https://img.shields.io/ossf-scorecard/github.com/HarryCordewener/TelnetNegotiationCore?style=flat-square&label=scorecard"></a> <a href="LICENSE"><img alt="Apache 2.0 license" src="https://img.shields.io/github/license/HarryCordewener/TelnetNegotiationCore?style=flat-square"></a> <a href="https://discord.gg/SK2cWERJF7"><img alt="Discord" src="https://img.shields.io/discord/1193672869104861195?style=flat-square&logo=discord&logoColor=white&label=discord"></a> </p>
<h1 align="center">Telnet Negotiation Core</h1>
<p align="center"> A composable, testable Telnet client and server library for .NET, built with MUDs in mind. </p>
<p align="center"> <a href="docs/index.md">Documentation</a> · <a href="docs/guides/getting-started.md">Getting started</a> · <a href="docs/protocols/index.md">Protocol reference</a> · <a href="CHANGELOG.md">Changelog</a> </p>
dotnet add package TelnetNegotiationCore
Why Telnet Negotiation Core?
Telnet is a byte-stream protocol with stateful negotiation layered throughout the connection. This library handles that machinery while leaving application behavior in your hands.
- Composable protocols — opt into each Telnet option as a plugin or register the common MUD set.
- Client and server support — build either side over
IDuplexPipe,TcpClient, orStream. - Predictable I/O — a state machine interprets incoming bytes and outgoing writes are serialized.
- Modern .NET integration — fluent configuration, dependency injection, logging, analyzers, and source generators.
- Built for verification — protocol behavior is isolated and testable down to exact wire bytes.
Quick start
BuildAndStartAsync wires the connection and starts the read loop. This server example adds window
size, GMCP, and server-status negotiation to a Kestrel connection:
var (telnet, readTask) = await new TelnetInterpreterBuilder()
.UseMode(TelnetInterpreter.TelnetMode.Server)
.UseLogger(logger)
.OnSubmit(HandleSubmitAsync)
.AddPlugin<NAWSProtocol>()
.OnNAWS(HandleWindowSizeAsync)
.AddPlugin<GMCPProtocol>()
.OnGMCPMessage(HandleGMCPAsync)
.AddPlugin<MSSPProtocol>()
.WithMSSPConfig(() => new MSSPConfig { Name = "My Server", UTF_8 = true })
.BuildAndStartAsync(connection.Transport);
await readTask; // Completes when the connection closes.
AddDefaultMUDProtocols() registers the common MUD protocol set in one call. Use
AddTelnetServer() or AddTelnetClient() to register the interpreter with a dependency-injection
container. The getting-started guide walks through a complete
connection.
Supported protocols
Each row is a plugin you register, and one page in the protocol reference.
| Specification | Specification | ||
|---|---|---|---|
| RFC 855 | Telnet Option Specification | MSSP | Mud Server Status Protocol |
| RFC 857 | Echo | MSDP | Mud Server Data Protocol |
| RFC 858 | Suppress Go-Ahead | GMCP | Generic Mud Communication Protocol |
| RFC 885 | End Of Record | EOR | End Of Record |
| RFC 1073 | Window Size (NAWS) | MTTS | Terminal type capabilities |
| RFC 1079 | Terminal Speed | MNES | Mud New Environment Standard |
| RFC 1091 | Terminal Type | MCCP | Compression, 2 and 3 |
| RFC 1096 | X-Display Location | MXP | MUD eXtension Protocol (option 91) |
| RFC 1184 | Line Mode (MODE) | MCP 2.1 | MUD Client Protocol, with cords |
| RFC 1372 | Flow Control | RFC 1950 | ZLIB compression |
| RFC 1408 | Environment | RFC 2066 | Charset, including TTABLE |
| RFC 1572 | New Environment | RFC 2941 | Authentication |
| RFC 2946 | Encryption | ||
| MSP | MUD Sound Protocol (option 90) | ||
| Pueblo | Pueblo handshake (in-band, no option) | ||
| Terminal queries | Kitty graphics, sixel, cell size and version, asked of the terminal (in-band, no option) |
Being a telnet negotiation library, it does not render the content layers that ride on top: ANSI, Pueblo, and MXP's own tags are the host application's to draw. MXP is negotiated and Pueblo is handshaken; neither's markup is parsed.
Project status
Stable. The package targets netstandard2.0, net8.0, net10.0 and net11.0. Building from source
needs the .NET 11 SDK (RC1 or later), which global.json pins.
Releases are published from GitHub Actions by trusted publishing — no long-lived key exists — and carry an attestation of the workflow and commit that built them:
gh attestation verify TelnetNegotiationCore.3.0.0.nupkg --repo HarryCordewener/TelnetNegotiationCore
Contributing
Issues and pull requests are welcome — see CONTRIBUTING.md for how to build and test, and SECURITY.md for anything that should not be public.
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. net11.0 is compatible. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.13)
- SharpZipLib (>= 1.4.2)
- StateAlchemist (>= 1.3.0)
- System.Collections.Immutable (>= 10.0.13)
- System.IO.Pipelines (>= 10.0.13)
- System.Memory (>= 4.6.3)
- System.Text.Json (>= 10.0.13)
- System.Threading.Channels (>= 10.0.13)
- TelnetNegotiationCore.Gmcp (>= 4.5.3)
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.13)
- StateAlchemist (>= 1.3.0)
- TelnetNegotiationCore.Gmcp (>= 4.5.3)
-
net11.0
- StateAlchemist (>= 1.3.0)
- TelnetNegotiationCore.Gmcp (>= 4.5.3)
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.13)
- StateAlchemist (>= 1.3.0)
- System.IO.Pipelines (>= 10.0.13)
- TelnetNegotiationCore.Gmcp (>= 4.5.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on TelnetNegotiationCore:
| Package | Downloads |
|---|---|
|
SharpMUSH.Library
SharpMUSH plugin contract surface (interim). External SharpMUSH plugins reference this package to write [SharpPlugin] : PluginBase entry types with [SharpCommand]/[SharpFunction] members. Aligned to PluginContractVersion 3.0.0. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.5.3 | 90 | 10/26/2026 |
| 4.5.2 | 1,446 | 10/24/2026 |
| 4.5.1 | 2,755 | 10/16/2026 |
| 4.5.0 | 2,402 | 10/8/2026 |
| 4.4.0 | 971 | 10/7/2026 |
| 4.3.0 | 4,550 | 9/23/2026 |
| 4.2.0 | 8,672 | 9/19/2026 |
| 4.1.1 | 572 | 9/15/2026 |
| 4.1.0 | 119 | 9/15/2026 |
| 4.0.0 | 193 | 9/14/2026 |
| 3.0.0 | 128 | 9/11/2026 |
| 2.16.0 | 1,613 | 9/7/2026 |
| 2.14.0 | 238 | 9/6/2026 |
| 2.13.0 | 147 | 8/30/2026 |
| 2.12.0 | 318 | 8/27/2026 |
| 2.11.0 | 335 | 8/20/2026 |
| 2.10.0 | 212 | 8/19/2026 |
| 2.9.1 | 392 | 8/18/2026 |
| 2.9.0 | 135 | 8/18/2026 |
| 2.8.3 | 137 | 8/18/2026 |