This solution consists of three projects:
- DateStream: A TCP server that sends the current date and time every minute to connected clients.
- EchoProcessingServer: A gRPC server that processes and responds to messages from clients.
- TcpToGrpcClient: A client application that connects to the
DateStreamTCP server, forwards received data to theEchoProcessingServer, and processes the gRPC responses.
DateStream is a TCP server that broadcasts the current date and time to connected clients every minute. This server uses basic TCP and threading operations to handle multiple clients.
- Listens on port
67for incoming TCP connections. - Sends the current date and time every minute.
-
Navigate to the DateStream Directory
cd DateStream -
Run the Application
dotnet run
EchoProcessingServer is a gRPC server that receives messages, processes them, and sends back a response. It acts as a service that the TcpToGrpcClient interacts with.
- Defines a gRPC service for message processing.
- Provides a response based on the received message.
-
Navigate to the EchoProcessingServer Directory
cd EchoProcessingServer -
Run the Application
dotnet run
TcpToGrpcClient is a client application that connects to the DateStream TCP server, receives date and time data, and forwards it to the EchoProcessingServer using gRPC. It then displays the gRPC responses.
- Connects to the
DateStreamTCP server. - Sends received data to the
EchoProcessingServervia gRPC. - Displays the response from the gRPC server.
-
Navigate to the TcpToGrpcClient Directory
cd TcpToGrpcClient -
Run the Application
dotnet run
Clone this repository to your local machine:
git clone https://github.com/furkansarikaya/EchoProcessingSolution.gitNavigate to the solution directory and build the entire solution:
dotnet buildEnsure that the EchoProcessingServer gRPC server URL in TcpToGrpcClient is correctly set.
For example:
var channel = GrpcChannel.ForAddress("https://localhost:7042");- .NET SDK (version 8.0 or later)
- Ensure all necessary NuGet packages are restored:
dotnet restore