serverclient
These programs exchange UDP datagrams. The user types a message with the client and the server replies with an acknowledgement (“OK!”). If the user sends a number, then the server shows the logic state of the corresponding GPIO on the RPi.

Dealing with the GPIO requires the WiringPi library. It provides a C library and a shell utility named gpio.

Inspired from http://www.spi.ens.fr/beig/systeme/sockets.html and http://www.binarytides.com/programming-udp-sockets-c-linux/

Server.c
Client.c

Back

Server & client programs
Tagged on:     

One thought on “Server & client programs

Leave a Reply