摘要: TCP通信 (一) tcp实验 ip 用途,唯一识别机器 port 用来绑定程序,即端口用来识别程序 服务端 //1.创建socket #include <sys/types.h> //常用类型 #include <sys/socket.h> //socket函数等 int socket(int d 阅读全文
posted @ 2018-02-01 16:31 23hour 阅读(201) 评论(0) 推荐(0)
摘要: 转自:https://www.cnblogs.com/ynxf/p/6105072.html 打开串口 在Linux系统下,打开串口是通过使用标准的文件打开函数操作的。 #include <fcntl.h> /* 以读写的方式打开 */ int fd = open( "/dev/ttyUSB0",O 阅读全文
posted @ 2018-02-01 16:08 23hour 阅读(177) 评论(0) 推荐(0)
Edit