HAN Pilot Platform
Demonstration Manual
58
www.terasic.com
September 6, 2019
message, the message is sent to a remote socket server via the socket. If the remote server socket
received the message, it will return a message “I got the message”. The client program will show
the received message on the console terminal and exit the program.
relative code statement. In the program,
socket
API is used to create a SOCK_STREAM socket,
connect
API is used to connect the remove socket sever based on the given hostname (or IP4v
Address) and port number. Data receiving and sending is implemented by
read
and
write
API, and
close is used to
close
the socket.
Figure 3-21 Socket Client Code
Demonstration Source Code
The source code of the design example is located in the Demonstration folder as shown in
. The Demonstration folder contains three platform subfolders:
arm
,
linux
and
windows
. The
project under the
arm
folder is designed for SoC FPGA board. The project under
linux
folder is
designed for Linux running on Linux PC. The project under
windows
folder is designed for SoC
EDS Shell running on Windows PC. Each platform subfolder contains socket_client and
socket_server project folders.
Содержание HAN Pilot Platform
Страница 1: ......
Страница 92: ...HAN Pilot Platform Demonstration Manual 91 www terasic com September 6 2019...