- Install .NET Core 3.1
pushd src/Server/ && dotnet build &&\
popd &&\
pushd src/Client/ && dotnet build &&\
popd
On two separate shells, run the client & server independently:
- Start server
# Shell 1
cd src/Server
dotnet run
- Start client
# Shell 2
cd src/Client
dotnet run
You'll then see messages being sent from the client and responses being sent from the server
To test the UDP client, start a netcat server before running the program:
cd src/Client
nc -lu 127.0.0.1 3000 &
dotnet run
Obviously the server will never respond as it's just a dumb listening socket so the client will just loop timing out.
To test the UDP server, start the server and then use a netcat udp client to send valid JSON:
cd src/Server
dotnet run &
echo -n '{"state": "connect", "id": "'$(uuidgen)'"}' | nc -u 127.0.0.1 3000
The server should respond to each valid client message issued by echo/netcat.