Data Sheet

UCTRONICS Ultimate Starter Leaning Kit for Raspberry Pi #K0064
111 www.uctronics.com
A socket address is the combination of an IP address and a port number, much like one end
of a telephone connection is the combination of a phone number and a particular extension.
Based on this address, internet sockets deliver incoming data packets to the appropriate
application process or thread.
Several Internet socket types are available:
1. Datagram sockets, also known as connectionless sockets, which use User Datagram
Protocol (UDP).
2. Stream sockets, also known as connection-oriented sockets, which use Transmission
Control Protocol (TCP) or Stream Control Transmission Protocol (SCTP).
3. Raw sockets (or Raw IP sockets), typically available in routers and other network
equipment. Here the transport layer is bypassed, and the packet headers are made
accessible to the application.
In this experiment, our program is based on stream socket, and the program is divided into
two parts, the client and the server. The server routine is run on the Raspberry Pi, and the
client routine is run on the PC. So you can send command to the server through the client,
and then control the LED connected to the Raspberry Pi.
8.20.4 Procedures
1. Build the circuit