QStreamNet 0.1.7

dotnet add package QStreamNet --version 0.1.7
NuGet\Install-Package QStreamNet -Version 0.1.7
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="QStreamNet" Version="0.1.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add QStreamNet --version 0.1.7
#r "nuget: QStreamNet, 0.1.7"
#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.
// Install QStreamNet as a Cake Addin
#addin nuget:?package=QStreamNet&version=0.1.7

// Install QStreamNet as a Cake Tool
#tool nuget:?package=QStreamNet&version=0.1.7

QStreamNet

QStreamNet is a dotnet library for streaming data though pipelines. It is inspired by ASP.NET Core's middleware pipeline. It is a simple, lightweight and fast library that allows you to build a pipeline for processing data. It is also flexible enough to allow you to build a pipeline with a single step.

Installation

dotnet add package QStreamNet

Features

Stream Client

It works with Stream Clients like

  • TCP
  • UDP
  • Serial Port

It can be used to build a pipeline for processing data.

Piplines

It works with

  • Services
  • Middlewares
  • Routes

Server & Client

It works on both

  • server side
  • client side

Usage

pipeline example:

Console.WriteLine("Hello, QStream!");

// services 
var sc = new ServiceCollection();
sc.AddSingleton<IStreamMiddlewareFactory, StreamMiddlewareFactory>();
var services = sc.BuildServiceProvider();
// pipes
var builder = new StreamApplicationBuilder(services);
builder
    .UseMiddleware<SimpleMiddleware>()
    .Use(async (context, next) => { Console.WriteLine("Easy Middleware"); await next(context); })
    .UseEnd(async context => { Console.WriteLine("End Middleware"); await Task.CompletedTask; });
// app
var context = new StreamContext() { Services = services.CreateScope().ServiceProvider };
var app = builder.Build();
// run it
await app(context);

// OUTPUT:
//
// Hello, QStream!
// SimpleMiddleware
// Easy Middleware
// End Middleware


// a simple class
class SimpleMiddleware : IStreamMiddleware
{
    public async Task InvokeAsync(StreamContext context, StreamPipeDelegate next)
    {
        Console.WriteLine("SimpleMiddleware");
        await next(context);
    }
}
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 was computed.  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. 
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
0.1.7 142 6/19/2023
0.1.6 115 6/14/2023
0.1.5 106 6/14/2023
0.1.4 113 6/8/2023
0.1.3 116 6/7/2023
0.1.2 114 6/6/2023
0.1.1 154 2/14/2023