diff --git a/04_intro_to_sockets/README.md b/04_intro_to_sockets/README.md index d222604..dd30935 100644 --- a/04_intro_to_sockets/README.md +++ b/04_intro_to_sockets/README.md @@ -1,20 +1,45 @@ -# IO Access +# Daytime TCP Server and Client -This program demonstrates how to access the GPIO pins on the Raspberry Pi using -a LED, a button and a temperature sensor. +## Description + +This project implements a daytime TCP/UDP server and client. +The server listens for incoming connections and responds with the current date +and time. The client sends a message to the choosing the output format of the +date and time. The server responnds with ## Usage ```bash $ make +# start tcp server +$ bin/daytimeTCPSrv +# run tcp client +$ bin/daytimeTCPCli + +# start udp server +$ bin/daytimeUDPSrv +# run udp client +$ bin/daytimeUDPCli ``` ## Testing with nc -Clients: +Start nc as a server. It will display any data it receives. The user can make +nc reply to the client by typing in the terminal. + ```bash # TCP $ nc -l 1234 # UDP $ nc -ul 1234 ``` + +Start nc as a client. It will send any data it receives from the user to the +server. + +```bash +# TCP +$ nc +# UDP +$ nc -u +```