dotnet-echo 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global dotnet-echo --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local dotnet-echo --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dotnet-echo&version=1.0.0
nuke :add-package dotnet-echo --version 1.0.0

Icon dotnet-echo

Version Downloads License CI Status CI Version

Installing or updating (same command can be used for both):

dotnet tool update -g dotnet-echo

Usage:

> dotnet echo -?
echo
  A trivial program that echoes whatever is sent to it via HTTP or gRPC

Usage:
  echo [options] [<endpoint>...]

Arguments:
  <endpoint>  Endpoint to listen on such as https://127.0.0.0:8080/ [default: https://127.0.0.1:4242/]

Options:
  -?, -h, --help  Show help and usage information

The program will automatically check for updates once a day and recommend updating if there is a new version available.

The service supports gRPC too, with echo.proto:

syntax = "proto3";

service chamber {
  rpc echo (message) returns (message);
}

message message {
  string payload = 1;
}

Since gRPC needs to use HTTP/2, it will use the defined prefix port + 1 (i.e. if you specify http://127.0.0.1:8080, the gRPC endpoint will be available at http://127.0.0.1:8081).

Example of a .NET client to run echo in the chamber service:

<Project>
  ...
  <ItemGroup>
    <PackageReference Include="Google.Protobuf" Version="*" />
    <PackageReference Include="Grpc.Net.Client" Version="*" />
    <PackageReference Include="Grpc.Tools" Version="*" />
  </ItemGroup>
  <ItemGroup>
    <Protobuf Include="echo.proto" GrpcServices="Client" />
  </ItemGroup>
</Project>
var channel = GrpcChannel.ForAddress("http://localhost:8081");
var service = new chamber.chamberClient(channel);

var response = await service.echoAsync(new message { Payload = "Hello World" }, cancellationToken: cancellation);

Console.WriteLine(response.Payload);

An example of the output during execution:

alternate text is missing from this package README image

And running on Ubuntu:

alternate text is missing from this package README image

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  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. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.2.0 407 10/13/2021
1.1.2 276 8/24/2021
1.0.0 420 7/10/2021
0.6.0 295 5/22/2021
0.5.0 336 5/20/2021
0.4.2 319 5/19/2021
0.4.1 327 5/19/2021