Net. runtime. win- x64. libsa
dotnet add package StirlingLabs.sockaddr.Net.runtime.win-x64.libsa --version 22.9.0
NuGet\Install-Package StirlingLabs.sockaddr.Net.runtime.win-x64.libsa -Version 22.9.0
<PackageReference Include="StirlingLabs.sockaddr.Net.runtime.win-x64.libsa" Version="22.9.0" />
paket add StirlingLabs.sockaddr.Net.runtime.win-x64.libsa --version 22.9.0
#r "nuget: StirlingLabs.sockaddr.Net.runtime.win-x64.libsa, 22.9.0"
// Install StirlingLabs.sockaddr.Net.runtime.win-x64.libsa as a Cake Addin #addin nuget:?package=StirlingLabs.sockaddr.Net.runtime.win-x64.libsa&version=22.9.0 // Install StirlingLabs.sockaddr.Net.runtime.win-x64.libsa as a Cake Tool #tool nuget:?package=StirlingLabs.sockaddr.Net.runtime.win-x64.libsa&version=22.9.0
libsa provides cross-platform socket address bindings in C11, designed to be very portable and easy to use. This allows higher-level network code to use a single format but still communicate effectively with low-level native platform code.
Users are guaranteed big endian (network) byte order of address bytes, so you do not have to worry about byte order for ports and scope indexes regardless of the underlying platform.
libsa abstracts away address family values, the location of the address family field, provides sizing information and takes care of allocation and freeing of sockaddr structures on the heap.
Why reinvent the wheel?
Historically, binding authors have had to work around platform inconsistency in sockaddr or rely on native libraries to manipulate sockaddr via helper functions (e.g.
libuv has a lot of sockaddr code). The concept provided by
libsa is to separate the helper functions from the target library, so it doesn't have to be rewritten every time, yet lets those bindings cooperate effectively.
Currently wrapped for:
- C#/.Net by sockaddr.Net
If you wrap libsa for another language, please create a PR to update this list.
We intend to expand this to any platform or shape of sockaddr without changing the API, all that should be required is by simply recompiling to the target platform with no special treatment.
Development of this project is supported by Stirling Labs.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on StirlingLabs.sockaddr.Net.runtime.win-x64.libsa:
Cross-platform socket addresses. Simply cast from native to StirlingLabs.sockaddr* for validation or manipulation without regard to the native format, then cast back to use in a native API.
This package is not used by any popular GitHub repositories.