UDP广播包的发送问题

在拥有多个设备时,如何得知设备是否存在呢?嵌入式设备发送广播包就是一个可行的方案。UDP广播包,打包buf中信息为设备的信息。而后经过UDP广播到网络中。linux 话很少说,直接给出广播包的源代码网络 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <arpa/inet
相关文章
相关标签/搜索