philipp2604.MockableSocket 3.0.0

dotnet add package philipp2604.MockableSocket --version 3.0.0                
NuGet\Install-Package philipp2604.MockableSocket -Version 3.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="philipp2604.MockableSocket" Version="3.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add philipp2604.MockableSocket --version 3.0.0                
#r "nuget: philipp2604.MockableSocket, 3.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.
// Install philipp2604.MockableSocket as a Cake Addin
#addin nuget:?package=philipp2604.MockableSocket&version=3.0.0

// Install philipp2604.MockableSocket as a Cake Tool
#tool nuget:?package=philipp2604.MockableSocket&version=3.0.0                

MockableSocket

License: MIT build and test GitHub Release NuGet Version

Description

This library aims to provide mockable classes for socket communication in .Net Core.

This library is still WIP and not complete yet.

A lot of the functionality has not been tested yet!

Implementations

Right now, the following interfaces and classes are implemented:

  • INetworkStream with NetworkStreamW as a replacement for NetworkStream
  • ISocket with SocketW as a replacement for Socket
  • ISocketAsyncEventArgs as a replacement for SocketAsyncEventArgs

Additional wrappers:

  • ITcpClient with TcpClient as a replacement for the standard .Net TcpClient

Download

You can acquire this library either directly via the NuGet package manager or by downloading it from the NuGet Gallery.

Questions? Problems?

Feel free to reach out!

Ideas / TODO

  • Wrappers, like TcpClient... ?

Credit

This library is using a lot of code from Microsoft's System.Net.Sockets namespace, it's sole purpose is to enable easier mocking.

License

This library is MIT licensed.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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
3.0.0 91 8/29/2024
2.0.0 106 8/27/2024
1.0.0 90 8/27/2024