ZeroNetwork.Core
2.3.0
See the version list below for details.
dotnet add package ZeroNetwork.Core --version 2.3.0
NuGet\Install-Package ZeroNetwork.Core -Version 2.3.0
<PackageReference Include="ZeroNetwork.Core" Version="2.3.0" />
<PackageVersion Include="ZeroNetwork.Core" Version="2.3.0" />
<PackageReference Include="ZeroNetwork.Core" />
paket add ZeroNetwork.Core --version 2.3.0
#r "nuget: ZeroNetwork.Core, 2.3.0"
#:package ZeroNetwork.Core@2.3.0
#addin nuget:?package=ZeroNetwork.Core&version=2.3.0
#tool nuget:?package=ZeroNetwork.Core&version=2.3.0
ZeroNetwork
Architectural Standard: 100% Pure C# BCL, Zero External Dependencies, Multi-Targeting across
.NET 8.0,.NET Framework 4.6.2, and.NET Standard 2.0.
ZeroNetwork is an ultra-high-performance, sovereign .NET networking suite engineered for factory floor automation, IoT edge gateways, distributed industrial systems, and high-load ERP infrastructures. It provides an end-to-end networking stack from Layer 2 (Data Link & Hardware) all the way up to Layer 7 (HTTP REST & Real-Time SignalR/WebSocket) with ZERO external NuGet dependencies, eliminating assembly conflicts and DLL hell on legacy .NET Framework runtimes while maximizing throughput on modern .NET 8+.
ποΈ Comprehensive Architecture & OSI Model Mapping
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ZeroNetwork Architecture β
βββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ€
β OSI Layer β Component β Key Highlights β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββ€
β Layer 7: RealTime β ZeroSignalRClient β Pure C# Hub Protocol v1 β
β β ZeroWebSocketClient β RFC 6455, Auto-Reconnect β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββ€
β Layer 7: HTTP β ZeroApiClient & Extensions β Zero-LOH Stream Pipeline β
β β ZeroHttpServer β Micro REST & Prometheus β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββ€
β Layer 4: Transportβ NetworkProbe & PortScanner β Zero-Leak TCP Handshake β
β β UdpMulticastClient & DnsProbe β IGMPv2/v3, Port 53 UDP β
β β NetworkThroughputMeter β Real-Time NIC Bandwidth β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββ€
β Layer 3: Network β IPNetwork & VirtualAdapterFilter β Allocation-Free CIDR β
β β Traceroute & PathMtuDiscovery β Hop Latency & Jumbo PMTU β
β β NetworkInfo & NetworkAdapterInfo β Deterministic NIC Select β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββ€
β Layer 2: DataLink β MacAddress & ArpTable β Blittable Struct, P/Invk β
β β ActiveArpScanner β Subnet Scanner (No ICMP) β
β β WakeOnLan β 102/108-byte Magic Pkt β
βββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββ
π Key Capabilities
1. Layer 2: Data Link & Hardware Discovery
MacAddress: Blittable 6-byte struct with zero-allocation span formatting (Span<char>) and IEEE OUI vendor detection (VMware, VirtualBox, Hyper-V, Docker, QEMU).ArpTable: Fast IP $\leftrightarrow$ MAC resolution via Windows P/Invoke (IpHlpApi.dll) and Linux/proc/net/arp.ActiveArpScanner: High-speed parallel ARP sweep across CIDR subnets to detect 100% of live nodes even when ICMP/Ping is disabled by firewalls.WakeOnLan: Generates RFC standard 102-byte Magic Packets with support for 6-byteSecureOnpasswords (108-byte packets) for remote machine power-on.
2. Layer 3: Network & Topology Math
IPNetwork: Pure C# CIDR math (Parse,Contains,BroadcastAddress,Netmask,WildcardMask) with zero-allocation host iterators usingSpan<byte>.VirtualAdapterFilter: Hybrid heuristics and hardware vendor OUI detection that filters out virtual interfaces (VMware, VirtualBox, WSL, Hyper-V, Tailscale, ZeroTier, Docker).NetworkInfo&NetworkAdapterInfo: Deterministic physical NIC resolution on multi-homed systems.Traceroute: Hop-by-hop ICMP route inspection with latency profiling.PathMtuDiscovery: Binary search PMTU analyzer using Don't Fragment (DF) flags (verifying Jumbo Frames MTU 9000 for GigE Vision cameras).
3. Layer 4: Transport & Diagnostics
NetworkProbe: Hardened non-blocking TCP socket prober (IsPortOpenAsync) withLingerState(true, 0)socket abort ensuring zero socket handle leaks under heavy loads.PortScanner: Parallel bounded-concurrency TCP port and subnet scanner governed bySemaphoreSlimwith streamingAction<PortScanResult>callbacks.UdpMulticastClient: IGMPv2/v3 multicast group publisher and subscriber with physical network interface binding.DnsProbe: Fast UDP port 53 DNS client with sub-second timeout and reverse PTR record resolution.NetworkThroughputMeter: Real-time NIC bandwidth meter (Rx/Tx Mbps) with saturation alert thresholds.
4. Layer 7: Micro HTTP Server & REST Client
ZeroHttpServer: Micro HTTP/1.1 server running in pure C# without administrator privileges, URL ACLs, or IIS. Features regex REST routing and built-in/metrics(Prometheus) and/healthendpoints.ZeroApiClient: High-performance HTTP client utilizing stream-based direct JSON serialization (IZeroJsonSerializer) to eliminate Large Object Heap (LOH) allocations, combined with connection pooling and exponential backoff retry.ZeroHttpExtensions: Fluent string extensions (url.GetJsonAsync<T>(),url.PostJsonAsync<T>()) for clean, allocation-efficient HTTP consumption.
5. Layer 7: Real-Time Full-Duplex (WebSocket & SignalR)
ZeroWebSocketClient: Resilient RFC 6455 WebSocket client built purely on BCLClientWebSocket. Includes thread-safe frame sending (SemaphoreSlim), automatic message reassembly for large payloads, configurable keep-alive heartbeat, and auto-reconnect with exponential backoff and random jitter.ZeroSignalRClient: Pure C# ASP.NET Core SignalR JSON Hub Client (Protocol v1) with 0 external dependencies (noMicrosoft.AspNetCore.SignalR.Clientbloat, eliminating DLL conflicts on .NET Framework 4.6.2). Supports automatic handshake, server-to-client callbacks (hub.On<T>), client invocations (hub.SendAsync,hub.InvokeAsync<T>), and keep-alive ping management.
π Quick Start Examples
1. Active ARP Subnet Scanning (Bypass ICMP Firewalls)
using ZeroNetwork.Discovery;
// Scan /24 subnet for all active devices via Data Link ARP
var devices = await ActiveArpScanner.ScanSubnetAsync("192.168.1.0/24", timeoutMs: 300);
foreach (var device in devices)
{
Console.WriteLine($"IP: {device.IpAddress} | MAC: {device.MacAddress} | Vendor: {device.Vendor}");
}
2. High-Performance REST Client (Zero-LOH Stream Pipeline)
using ZeroNetwork.Http;
// Fluent API with automatic connection pooling and retry
var users = await "https://api.factory.local/users".GetJsonAsync<List<UserDto>>();
// Or using ZeroApiClient directly
using var client = new ZeroApiClient(new ZeroApiClientOptions
{
BaseAddress = new Uri("https://api.factory.local"),
MaxRetries = 3
});
var response = await client.PostJsonAsync<OrderRequest, OrderResult>("/orders", new OrderRequest { OrderId = 1001 });
3. Pure C# SignalR Hub Client (0 External Dependencies)
using ZeroNetwork.RealTime;
using var hub = new ZeroSignalRClient("ws://erp-server:5000/hub/inventory");
// Register server-to-client event listener
hub.On<StockUpdateDto>("OnStockChanged", dto =>
{
// Instantly update WinForms / WPF UI
Console.WriteLine($"[RealTime] SKU {dto.Sku}: {dto.CurrentQty}");
});
await hub.StartAsync();
// Fire-and-forget invocation
await hub.SendAsync("JoinWarehouseGroup", "WH-01");
// Request-response invocation
int pendingCount = await hub.InvokeAsync<int>("GetPendingOrdersCount", "WH-01");
4. Resilient WebSocket Client (Auto-Reconnect & Keep-Alive)
using ZeroNetwork.RealTime;
var options = new ZeroWebSocketOptions
{
ServerUri = new Uri("ws://edge-gateway.local:8080/telemetry"),
AutoReconnect = true,
InitialReconnectDelay = TimeSpan.FromSeconds(1),
KeepAliveInterval = TimeSpan.FromSeconds(15)
};
using var ws = new ZeroWebSocketClient(options);
ws.MessageReceived += msg => Console.WriteLine($"Received: {msg}");
ws.Reconnected += () => Console.WriteLine("Connection restored!");
await ws.ConnectAsync();
await ws.SendJsonAsync(new { deviceId = "CNC-01", status = "ONLINE" });
5. Micro HTTP Server with Prometheus Metrics
using ZeroNetwork.Http;
using var server = new ZeroHttpServer(port: 9090, ipAddress: "0.0.0.0");
server.MapGet("/api/status", req => ZeroHttpResponse.Json("{\"status\":\"OK\"}"));
server.MapPost("/api/trigger", req => ZeroHttpResponse.Text("Triggered: " + req.Body));
server.Start();
// Automatic Prometheus endpoint available at: http://localhost:9090/metrics
// Health check available at: http://localhost:9090/health
π» Supported Platforms
| Framework | Target Support | Dependency Footprint |
|---|---|---|
| .NET 8.0+ | Native (net8.0) |
0 Dependencies |
| .NET Framework | Legacy WinForms / WPF (net462) |
0 Dependencies (BCL only) |
| .NET Standard | Universal Cross-Platform (netstandard2.0) |
0 Dependencies |
π License
MIT License Β© 2026 Phong VΓ΅ (kzxl). Part of the ZeroPlatform sovereign ecosystem.
| 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 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. |
| .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 is compatible. 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. |
-
.NETFramework 4.6.2
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
- System.ValueTuple (>= 4.5.0)
- ZeroConcurrency (>= 1.2.0)
- ZeroPrimitives.Core (>= 1.3.0)
-
.NETStandard 2.0
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
- System.ValueTuple (>= 4.5.0)
- ZeroConcurrency (>= 1.2.0)
- ZeroPrimitives.Core (>= 1.3.0)
-
net8.0
- ZeroConcurrency (>= 1.2.0)
- ZeroPrimitives.Core (>= 1.3.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ZeroNetwork.Core:
| Package | Downloads |
|---|---|
|
ZeroUI.Core
High-performance, zero-allocation core runtime and industrial automation infrastructure for .NET (SQLite Historian, Modbus TCP, Siemens S7, PackML, OEE, UiDispatcher, WorkerQueue). |
GitHub repositories
This package is not used by any popular GitHub repositories.