3.进入server目录进行编译:
$ cd server
$ $CC server.c -o server.out
测试:
1.把可执行文件server.out移植到开发板中
2.运行:
$./server.out
3.在虚拟机中client目录运行:
$./client 192.168.137.81(开发板ip地址)
4.可在开发板中接收到数据:
OK: Obtain Socket Despcritor sucessfully.
OK: Bind the Port 5000 sucessfully.
OK: Listening the Port 5000 sucessfully.
OK: Server has got connect from 192.168.137.83.
You can enter string, and press 'exit' to end the connect.
5.在开发板中输入字符,可在虚拟机中接收到:
You can enter string, and press 'exit' to end the connect.
www.myzr.com
OK: Sent 12 bytes sucessful, please enter again.