Flynk.Net.Services.Transmit.Grpc.Client 1.1.1

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Flynk.Net.Services.Transmit.Grpc.Client --version 1.1.1
                    
NuGet\Install-Package Flynk.Net.Services.Transmit.Grpc.Client -Version 1.1.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="Flynk.Net.Services.Transmit.Grpc.Client" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Flynk.Net.Services.Transmit.Grpc.Client" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Flynk.Net.Services.Transmit.Grpc.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Flynk.Net.Services.Transmit.Grpc.Client --version 1.1.1
                    
#r "nuget: Flynk.Net.Services.Transmit.Grpc.Client, 1.1.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.
#:package Flynk.Net.Services.Transmit.Grpc.Client@1.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Flynk.Net.Services.Transmit.Grpc.Client&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Flynk.Net.Services.Transmit.Grpc.Client&version=1.1.1
                    
Install as a Cake Tool

Flynk.Net.Services.Transmit.Grpc.Client

Lightweight gRPC client library for the Flynk Transmission Service. Provides typed RPC communication with routing, serialization, and reconnection support.

Features

  • Typed request/response handling with automatic JSON serialization
  • Route-based message handlers
  • Built-in reconnection with configurable settings
  • Service discovery via Info endpoint
  • Echo endpoint for connectivity testing
  • No ASP.NET Core dependencies - ideal for mobile, desktop, and microservice clients

Installation

dotnet add package Flynk.Net.Services.Transmit.Grpc.Client

Quick Start

using Flynk.Net.Services.Transmit.Grpc.Client;
using Microsoft.Extensions.Logging;

// Create logger
var loggerFactory = LoggerFactory.Create(b => b.AddConsole());
var logger = loggerFactory.CreateLogger<RpcClient>();

// Create client
using var client = new RpcClient(
    address: "http://localhost:5001",
    clientId: "my-client",
    logger: logger
);

// Send request to server (no recipientId = routes to server)
var response = await client.Send<PingRequest, PingResponse>(
    route: "ping",
    request: new PingRequest { Message = "Hello!" }
);

if (response.IsOK)
{
    Console.WriteLine($"Server replied: {response.Payload.Message}");
}

Receiving Messages

Register handlers to receive and process incoming requests:

// Register a typed handler
client.RegisterRoute<OrderRequest, OrderResponse>("order.create",
    async (request, metadata) =>
    {
        var order = ProcessOrder(request);
        return Response<OrderResponse>.OK(order);
    });

// Start listening for incoming messages
client.StartListening();

// Keep running...
Console.ReadLine();

// Cleanup
client.StopListening();

Configuration

var settings = new RpcClientSettings
{
    EnableReconnection = true,          // Auto-reconnect on disconnect
    ReconnectionDelaySeconds = 5,       // Wait between attempts
    MaxReconnectionAttempts = 10        // Use -1 for unlimited
};

var client = new RpcClient(
    address: "http://localhost:5001",
    clientId: "my-client",
    logger: logger,
    settings: settings
);

Custom JSON Serialization

var jsonOptions = new JsonSerializerOptions
{
    PropertyNameCaseInsensitive = true,
    PropertyNamingPolicy = JsonNamingPolicy.CamelCase
};

var client = new RpcClient(
    address: "http://localhost:5001",
    clientId: "my-client",
    logger: logger,
    jsonOptions: jsonOptions
);

Built-in System Routes

// Get information about another client
var info = await client.Info("target-client-id");
// Returns: ClientId, MachineName, OSVersion, ProcessId, CLRVersion, RegisteredRoutes

// Test connectivity with echo
var echo = await client.Echo("target-client-id", "test message");

Response Handling

// Success responses
return Response<MyResponse>.OK(payload);
return Response<MyResponse>.OK(payload, "Optional message");

// Failure responses
return Response<MyResponse>.FAILED("Error description");

Class-Based Handlers

public class OrderHandler : TypedRouteHandler<OrderRequest, OrderResponse>
{
    protected override async Task<Response<OrderResponse>> HandleTypedAsync(
        OrderRequest request,
        Dictionary<string, string> metadata)
    {
        var order = await ProcessOrder(request);
        return Response<OrderResponse>.OK(order);
    }
}

// Register
client.RegisterRouteHandler("order.create", new OrderHandler());

Server Package

For hosting the gRPC server, install the companion package:

dotnet add package Flynk.Net.Services.Transmit.Grpc.Server

See the Server package documentation for setup instructions.

License

This software is licensed under the Flynk Freeware License.

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.  net9.0 is compatible.  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. 
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
1.5.0 93 2/16/2026
1.4.0 87 2/15/2026
1.3.2 102 1/13/2026
1.2.1 297 12/18/2025
1.1.2 287 12/16/2025
1.1.1 285 12/16/2025
1.1.0 295 12/16/2025