API Reference

Read time 3 minutes
On this page

Nalix API documentation is organized by package boundary and runtime responsibility so you can move from contracts (Nalix.Abstractions) to execution (Nalix.Runtime, Nalix.Network) and then to client transport (Nalix.SDK) without mixing concerns.

Where to start

If you’re looking for the core interfaces and classes that drive Nalix:

Source Mapping

  • src/Nalix.Abstractions
  • src/Nalix.Environment
  • src/Nalix.Codec
  • src/Nalix.Framework
  • src/Nalix.Runtime
  • src/Nalix.Network
  • src/Nalix.Hosting
  • src/Nalix.SDK
  • analyzers/Nalix.Analyzers
  • analyzers/Nalix.Analyzers.CodeFix
  • analyzers/Nalix.Analyzers.CodeGen

Why This Structure Exists

Nalix is split into focused packages with explicit layering:

  • Nalix.Abstractions defines shared contracts and attributes.
  • Nalix.Environment provides foundational memory types, configuration, and environment primitives.
  • Nalix.Codec handles serialization, built-in frames, and data transforms.
  • Nalix.Framework provides reusable runtime services, instance management, and tasking.
  • Nalix.Runtime turns packets into handler execution and provides reusable middleware/throttling components.
  • Nalix.Network owns listeners, connections, protocols, and session stores.
  • Nalix.Hosting adds host/builder composition on top of runtime + network.
  • Nalix.SDK provides client-side transport sessions and extension APIs.

This keeps server runtime internals, transport lifecycle, and client APIs independently evolvable.

Package Responsibility Matrix

PackagePrimary responsibilityUse whenAvoid when
Nalix.AbstractionsCore interfaces/enums/attributesYou need shared contracts across packagesYou need concrete runtime behavior
Nalix.EnvironmentMemory, Config, IO, ClockYou need zero-allocation memory primitivesYou only need high-level networking
Nalix.CodecSerialization, Frames, TransformsYou need to pack/unpack data or register packetsYou only need transport lifecycle
Nalix.FrameworkRuntime services and identifiersYou need instance management or task schedulingYou only need pure client transport
Nalix.RuntimePacket dispatch and middlewareYou are building handler execution pipelinesYou only need socket listener primitives
Nalix.NetworkConnection + listener + protocolYou are implementing server transport loopsYou only need pure client transport
Nalix.HostingHost-style startup compositionYou want builder-driven server bootstrappingYou prefer manual wiring
Nalix.SDKClient transport and sessionsYou build Nalix clientsYou implement server listeners

Progressive API Path

  1. Start with Common contracts and connection/session abstractions.
  2. Learn packet runtime flow in Runtime API.
  3. Move to transport lifecycle in Network API.
  4. For clients, continue with SDK API.
  5. For production startup composition, use Hosting API.

Suggested Architecture Diagrams

  • Dispatch sequence: IBufferLease -> PacketRegistry -> PacketContext<TPacket> / IPacketContext<TPacket> -> handler.
  • Server layering: Listener (Nalix.Network) above runtime dispatch (Nalix.Runtime) and shared contracts (Nalix.Abstractions).
  • Client-server handshake lifecycle using Nalix.SDK.Transport.Extensions + runtime handlers.