Wired.IO 9.2.0

dotnet add package Wired.IO --version 9.2.0
                    
NuGet\Install-Package Wired.IO -Version 9.2.0
                    
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="Wired.IO" Version="9.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Wired.IO" Version="9.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Wired.IO" />
                    
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 Wired.IO --version 9.2.0
                    
#r "nuget: Wired.IO, 9.2.0"
                    
#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 Wired.IO@9.2.0
                    
#: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=Wired.IO&version=9.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Wired.IO&version=9.2.0
                    
Install as a Cake Tool

NuGet

License

This project includes code originally from GenHttp, which is licensed under the MIT License.

Portions of this code are © [Andreas Nägeli] and used under the terms of the MIT License:

  • PooledDictionary.cs
  • PoolBufferedStream.cs
  • ContentType.cs

Full project documentation

Wired.IO is a lightweight, high-performance HTTP server framework for .NET. Designed from the ground up for embedding, extensibility, and raw speed, it gives you full control over your request pipeline without the weight of traditional web frameworks.

Whether you're building APIs, embedded servers, developer tools, or hybrid applications, Wired.IO provides a focused, zero-friction foundation that runs anywhere your .NET code does — no external hosting required.

Existing Main Features

  • Http/1.1
  • Custom Http Handlers for custom Http/x protocols
  • Inbuilt Dependency Injection/IoC Container with IServiceCollecion/IServiceProvider
  • Fast/Minimal and Mediator-like Endpoints
  • Full Secure/TLS
  • Full Custom Middleware
  • Pipeline Behaviors Support with Mediator
  • Native ILoggingFactory
  • Static Resource Hosting
  • Websockets RFC 6455
  • Wired Events for Event Driven Design
  • Embeddable with exising Apps

Upcoming features

  • Compression (planned, needs some research for mobile app compatibility)
  • ETag caching (planned next release)
  • JWT Support (planned)
  • CORS Support (planned next release)
  • form-data support (not planned, low priority)

Why Wired.IO?

Unlike other lightweight web servers such as NetCoreServer or EmbedIO, Wired.IO is built directly on top of .NET’s IServiceCollection and integrates seamlessly with the standard dependency injection system. This design enables Wired.IO to provide the same modularity, extensibility, and testability benefits as ASP.NET Core, while still being extremely lightweight and embeddable. In contrast, other alternatives often rely on custom service registration patterns or lack DI support entirely, making them harder to scale or integrate cleanly with modern application architectures. With Wired.IO, developers can reuse familiar patterns like constructor injection, scoped services, middleware, and configuration, gaining the flexibility of ASP.NET Core with the performance and simplicity of a microserver.

  • Fast by default – Built on System.IO.Pipelines and optimized for low allocations and high throughput.
  • 🧩 Fully embeddable – Add a production-ready HTTP server directly into your desktop, mobile, or console app.
  • 🧵 Lean and composable – Define only what you need: your context, your pipeline, your handlers.
  • 🔧 Customizable by design – TLS, routing, DI, and middleware are all open and easily replaceable.
  • 🌐 Hybrid app ready – Serve a full web-based frontend from inside your app. Pair your MAUI or desktop backend with a modern SPA or HTML/JS UI — all self-hosted.
  • 🪶 No runtime magic – Everything is explicit. No black boxes, no surprises.

Built for Embedding

Wired.IO was created to run inside your app, not alongside it. This means you can:

  • Run an HTTP interface inside a background service, tool, or MAUI app.
  • Use it for internal tooling, configuration UIs, simulators, or control panels.
  • Serve static files, WebSockets, or JSON APIs directly from your executable.
  • Create hybrid apps with native backends and web-based frontends, served over localhost.

Quick Start

Include the Wired.IO package in your project.

dotnet add package Wired.IO --version 9.1.0

Wire up a basic endpoint

No middlewares, directly respond to the socket's NetworkStream using PipeWriter.

using Wired.IO.App;
using Wired.IO.Http11.Context;

var builder = WiredApp.CreateBuilder(); // Create a default builder, assumes HTTP/1.1

var app = builder
    .Port(5000) // Configured to http://localhost:5000
    .MapGet("/quick-start", scope => async httpContext =>
    {
        await httpContext
            .SendAsync("HTTP/1.1 200 OK\r\nContent-Length:0\r\nContent-Type: application/json\r\nConnection: keep-alive\r\n\r\n"u8.ToArray());
    })
    .Build();

await app.RunAsync();

Using response building middleware to correctly send proper response headers and content

using System.Text.Json;
using Wired.IO.App;
using Wired.IO.Http11.Response.Content;
using Wired.IO.Protocol.Response;

var builder = WiredApp.CreateBuilder(); // Create a default builder, assumes HTTP/1.1

var app = builder
    .Port(5000) // Configured to http://localhost:5000
    .MapGet("/quick-start", scope => httpContext =>
    {
        httpContext
            .Respond()
            .Status(ResponseStatus.Ok)
            .Type("application/json")
            .Content(new JsonContent(
                new { Name = "Toni", Age = 18 }, 
                JsonSerializerOptions.Default));
    })
    .Build();

await app.RunAsync();

Add logging and inject a dependency

Just like ASP.NET, scoped dependencies are disposed by the end of the request processing.

using System.Text.Json;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Wired.IO.App;
using Wired.IO.Http11.Response.Content;
using Wired.IO.Protocol.Response;

var builder = WiredApp.CreateBuilder(); // Create a default builder, assumes HTTP/1.1

builder.Services
    .AddLogging(loggingBuilder => {
        loggingBuilder.ClearProviders();
        loggingBuilder.AddConsole();
        loggingBuilder.SetMinimumLevel(LogLevel.Information); // Set the minimum log level
    })
    .AddScoped<DependencyService>();

var app = builder
    .Port(5000) // Configured to http://localhost:5000
    .MapGet("/quick-start", scope => async httpContext =>
    {
        var dependency = scope.GetRequiredService<DependencyService>();
        dependency.Handle(); // Use the service

        httpContext
            .Respond()
            .Status(ResponseStatus.Ok)
            .Type("application/json")
            .Content(new JsonContent(
                new { Name = "Alice", Age = 30 }, 
                JsonSerializerOptions.Default));
    })
    .Build();

await app.RunAsync();

class DependencyService(ILogger<DependencyService> logger) : IDisposable
{
    public void Handle() =>
        logger.LogInformation($"{nameof(DependencyService)} was handled.");
    public void Dispose() =>
        logger.LogInformation($"{nameof(DependencyService)} was disposed.");
}
Product Compatible and additional computed target framework versions.
.NET 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 is compatible.  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 was computed.  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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.2.0 122 7/28/2025
9.1.0 303 7/20/2025
9.0.0 133 7/2/2025