ASP.NET Core 5.0 gRPC simple chat implementation for people who want to get familiar with some gRPC features
This solution contains server and client for simplest chat app. Console client connects to the server and sends messages. Server replicates messages to sender and other connected clients.
- Client-to-server messages (client sends messages) are done using unary calls.
- Server-to-client messages (server sends received message to clients) are done using server-side streaming and Channels.
There are nothing about authentication. Client sends a nickname
when connects to a feed and nickname + message
on each chat message send.
More details in chat.proto file.
- Change your working directory to
/src
- Run
docker build .
- Run
docker run -p 80:80 <container_id_from_build>
Don't miss the part with port forwarding using -p
, otherwise client will stay without port to connect to.
- Make sure you have at least .NET 5.0 SDK installed
- Change your working directory to
/src/GrpcHelloWorld.Server
- Run
dotnet run
- Make sure you have at least .NET 5.0 SDK installed
- Change your working directory to
/src/GrpcHelloWorld.Client
- (optional) Change your nickname in
appsettings.json
- Run
dotnet run