LoguxNET.Server.Interop 1.0.0

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

LoguxNET.Server.Interop

Русская версия

Low-level P/Invoke bindings to the clogux native shared library (logux-core).

Target Framework

net10.0 — uses source-generated LibraryImport for zero-overhead marshalling.

Purpose

This project is the foundation layer of the server stack. It is not intended for direct use — LoguxNET.Server.Core and LoguxNET.Server.AspNet build on top of it.

Structure

LoguxNET.Server.Interop/
├── LoguxError.cs              Error code enum (Ok, InvalidJson, UnknownConnection, ...)
├── LoguxHandle.cs             Generational connection handle (Page + Slot + Generation)
├── LoguxStats.cs              Server statistics snapshot (27 fields)
└── Native/
    ├── CloguxNative.cs        LibraryImport P/Invoke declarations
    ├── NativeCallbacks.cs     Unmanaged delegate types for 7 callbacks
    └── NativeStructs.cs       Blittable struct mirrors (NativeLoguxConfig, NativeLoguxOutbound)

Public Types

LoguxHandle

Generational handle to a connection slot in the clogux engine. Matches the C LoguxHandle struct layout exactly.

public readonly struct LoguxHandle : IEquatable<LoguxHandle>
{
    public readonly ushort Page;
    public readonly ushort Slot;
    public readonly uint Generation;
    public static LoguxHandle Null => default;
    public bool IsNull { get; }
}

LoguxError

Error codes returned by native library functions:

Code Value Meaning
Ok 0 Success
InvalidJson -1 Malformed JSON
InvalidMessage -2 Valid JSON but not a valid Logux message
UnknownConnection -3 Handle does not match any active connection
Protocol -4 Protocol version mismatch
Subprotocol -5 Subprotocol version mismatch
AuthFailed -6 Authentication rejected
BufferFull -7 Internal buffer overflow
NullArgument -8 Required argument was null
AllocationFailed -9 Memory allocation failure
ShuttingDown -10 Server is shutting down
ConnectionLimit -11 Max connections reached
MessageTooLarge -12 Message exceeds MaxFeedSize

LoguxStats

Snapshot of 27 server statistics fields — gauges (active connections, queue depth) and monotonic counters (bytes in/out, actions processed, errors, etc.).

Internal Types

CloguxNative

Source-generated LibraryImport bindings for all 15 native functions:

  • Lifecycle: logux_server_create, logux_server_destroy, logux_server_shutdown
  • Connections: logux_connection_accept, logux_feed_data, logux_connection_close
  • Event loop: logux_tick, logux_poll_outbound
  • Introspection: logux_get_stats, logux_version
  • Memory: logux_free
  • Callbacks: 7 logux_set_*_callback functions

NativeCallbacks

7 unmanaged delegate types matching C function pointer typedefs: NativeAuthCallback, NativeAccessCallback, NativeProcessCallback, NativeResendCallback, NativeChannelAccessCallback, NativeChannelLoadCallback, NativeErrorCallback.

Native Library

The library name is logux-core. Place the appropriate binary next to the application:

Platform File
Windows logux-core.dll
Linux liblogux-core.so
macOS liblogux-core.dylib
Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on LoguxNET.Server.Interop:

Package Downloads
LoguxNET.Server.Core

Managed wrapper around the clogux C engine for Logux Protocol v5.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 124 4/5/2026