python SOCK_DGRAM
时间: 2023-10-15 20:25:15 浏览: 107
SOCK_DGRAM是Python中的网络套接字类型,用于实现UDP协议的数据传输。UDP是面向无连接的,不保证数据的可靠性和顺序性,但是传输速度快。在使用SOCK_DGRAM套接字类型时,可以通过socket.sendto()方法发送数据,并且可以通过socket.recvfrom()方法接收数据。使用UDP套接字可以实现简单的消息发送和接收。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [Python 基础 之 网络 socket 使用 udp (SOCK_DGRAM)简单介绍、并实现简单的消息发送和接收](https://blog.csdn.net/u014361280/article/details/113737900)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [undefined](undefined)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文