A typical UDP socket session

本文解析了UDP (User Datagram Protocol) 套接字的特性,指出它们不区分服务器和客户端,强调了连接和未连接socket的区别。重点在于未连接socket的通信范围和连接socket的数据定向,同时强调了UDP数据包的不确定性。讲解了使用典型datagram socket的调用流程图。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

IBM Documentation

User Datagram Protocol (UDP) socket processes, unlike TCP socket processes, are not clearly distinguished by server and client roles. The distinction is between connected and unconnected sockets. An unconnected socket can be used to communicate with any host; but a connected socket, because it has a dedicated destination, can send data to, and receive data from, only one host.

Both connected and unconnected sockets send their data over the network without verification. Consequently, after a packet has been accepted by the UDP interface, the arrival and integrity of the packet cannot be guaranteed.

See Figure 1 for the general sequence of calls to be followed for most socket routines using UDP, or datagram, sockets.

Figure 1. A typical datagram socket session

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值