【网络】简单的UDP网络程序
UDP的特点:
无连接, 不可靠, 面向数据报传输
UDP网络程序通信流程及接口介绍:
服务端:
1. 创建套接字
int socket(int domain, int type, int protocol);
domain: 地址域
AF_INET: IPV4网络协议地址域
type: 套接字类型
SOCK_STREAM: 字节流---可靠,双向
SOCK_DGRAM: 数据报套接字---无连接,不可靠
protocol: 协议类型
0: 使用套
原创
2020-08-31 18:47:26 ·
328 阅读 ·
0 评论