qRPC 6.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package qRPC --version 6.2.1                
NuGet\Install-Package qRPC -Version 6.2.1                
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="qRPC" Version="6.2.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add qRPC --version 6.2.1                
#r "nuget: qRPC, 6.2.1"                
#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 qRPC as a Cake Addin
#addin nuget:?package=qRPC&version=6.2.1

// Install qRPC as a Cake Tool
#tool nuget:?package=qRPC&version=6.2.1                

qRPC

qRPC stands for Quick Remote Procedure Call. It's a project I've made, aimed at .NET, to counter the tedium required for simple RPC projects when using gRPC. qRPC works by serializing a message object into JSON and sending it over TCP, where it is deserialized. To facilitate calls to look like the implementation is within the same application, I've used Castle DynamicProxy - a big thank you to them!

How Does it Work?

The first step is to crate an interface, which will be shared between the client and server.

public interface IMyService{
  string RemoteConcat(string a, string b);
}

Note that all method parameters must be JSON serializable. Thus all class parameters must have parameterless constructors.
If you pass in an object, the remote version will not be the same object. It will consist of the class properties re-serialized.

The server creates an implementation of the interface and registers it as an RPC server, listening on a given IP and port.

public MyService : IMyService{
  public string RemoteConcat(string a, string b) => a + b;
}

MyService server = new MyService();
QrpcServer<IMyService>(server, 5000, Encoding.UTF8);

The client registers the destination IP and port and calls the methods easily.

var client = QrpcClient<IMyService>(5000, "127.0.0.1", Encoding.UTF8);

var joinedString = client.RemoteConcat("Hello", " World");
Console.WriteLine(joinedString); //Gives us "Hello World"

Coming (hopefully) soon:

  • Encryption/Security
  • ServiceCollection registration
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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.

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
6.3.0 180 10/2/2023
6.2.2 122 9/17/2023
6.2.1 211 5/28/2023
6.1.1 361 12/28/2022
1.1.1 362 1/14/2022