首页 > TAG信息列表 > lsockfd
UDP通讯示例
通过UDP实现两个不同进程间的通讯 头文件:proto.h #ifndef __PROTO_H__#define __PROTO_H__ #define PORT "5050" //端口#define NAMESIZE 11 struct student_st //自定义传输数据类型{ uint8_t name[NAMESIZE]; uint32_t math; uint32_t chinese;}__attrUDP通讯示例
通过UDP实现两个不同进程间的通讯 头文件:proto.h #ifndef __PROTO_H__#define __PROTO_H__ #define PORT "5050" //端口#define NAMESIZE 11 struct student_st //自定义传输数据类型{ uint8_t name[NAMESIZE]; uint32_t math; uint32_t chinese;}__attr