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
<PackageReference Include="LoguxNET.Server.Interop" Version="1.0.0" />
<PackageVersion Include="LoguxNET.Server.Interop" Version="1.0.0" />
<PackageReference Include="LoguxNET.Server.Interop" />
paket add LoguxNET.Server.Interop --version 1.0.0
#r "nuget: LoguxNET.Server.Interop, 1.0.0"
#:package LoguxNET.Server.Interop@1.0.0
#addin nuget:?package=LoguxNET.Server.Interop&version=1.0.0
#tool nuget:?package=LoguxNET.Server.Interop&version=1.0.0
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_*_callbackfunctions
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 | Versions 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. |
-
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 |