Ipcez 0.1.0
dotnet add package Ipcez --version 0.1.0
NuGet\Install-Package Ipcez -Version 0.1.0
<PackageReference Include="Ipcez" Version="0.1.0" />
<PackageVersion Include="Ipcez" Version="0.1.0" />
<PackageReference Include="Ipcez" />
paket add Ipcez --version 0.1.0
#r "nuget: Ipcez, 0.1.0"
#:package Ipcez@0.1.0
#addin nuget:?package=Ipcez&version=0.1.0
#tool nuget:?package=Ipcez&version=0.1.0
ipcez C# bindings
.NET 8 library that calls the ipcez C FFI via P/Invoke.
Recommendation: Use Ipcez.Connect(addr) for most cases: pass one endpoint string and set target / os in the environment for local, or use a ws:// / wss:// URL for remote. No need to pass target/os or pick address format yourself.
Requirements
- .NET 8 SDK
- Built
ipcez_ffinative library (see below)
When a connection or I/O error occurs, the core library logs a message to stderr (e.g. ipcez: error: ...).
Build the native library
From the repository root:
cargo build -p ipcez-ffi --release
On Windows the library is target/release/ipcez_ffi.dll. The C# project has a post-build step that copies it from target\release (or target\debug when building in Debug) into the output directory, so building the C# project after building the Rust crate will place the DLL next to your assembly.
If the copy fails (e.g. path differs), set the output of ipcez-ffi to this repo’s target/release and ensure that directory is on the process path when running your app, or copy ipcez_ffi.dll manually into the application output directory.
Project layout
Ipcez/— main project.Native.cs— P/Invoke declarations.Ipcez.cs— static API:Connect(addr).IpcezSocket.cs— socket wrapper withRead,Write,Close,IDisposable.
How to use
- Local: Set env
target=localandos=windows(oros=linux). Pass the endpoint: pipe name (e.g."mypipe") on Windows, or socket path (e.g."/tmp/ipcez.sock") on Linux. The library adds\\.\pipe\on Windows if needed. - Remote: Pass a WebSocket URL:
"ws://host:port/path"or"wss://...". Env is ignored for URLs.
Use Ipcez.Connect(addr) for this behavior.
API
Ipcez.Connect(string addr) -> IpcezSocket— Connect with one endpoint string; uses env for local, or ws/wss URL for remote.IpcezSocket.Read(byte[] buffer) -> int— Read into buffer; returns bytes read.IpcezSocket.Write(byte[] buffer) -> int— Write; returns bytes written.IpcezSocket.Close()— Close the socket. ImplementsIDisposableforusingsupport.
Minimal example (recommended: simple connect)
using System.Text;
using Ipcez;
// Set env: target=local, os=windows (or linux). For remote, use a ws:// or wss:// URL.
using var socket = Ipcez.Connect("mypipe"); // or "ws://localhost:8080/" for remote
socket.Write(Encoding.UTF8.GetBytes("hello"));
var buf = new byte[256];
int n = socket.Read(buf);
The C# wrapper exposes only single-endpoint connect. For explicit target/os you would need the Rust API or an extended FFI.
Linux / macOS
The csproj copy step currently targets the Windows DLL. For Linux/macOS, build the FFI and copy libipcez_ffi.so or libipcez_ffi.dylib into the application output and ensure it is loadable (e.g. LD_LIBRARY_PATH or same directory as the app). P/Invoke in Native.cs may need a DllImport name per platform if the file names differ.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net8.0
- No dependencies.
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.0 | 99 | 2/15/2026 |