简体   繁体   English

DatagramSocket的发送方法是异步的吗?

[英]DatagramSocket send method is asynchronous?

What does it mean that DatagramSocket send operation/method is asynchronous? DatagramSocket发送操作/方法是异步的意味着什么? That it is not waiting for client to receive datagrams? 它不是在等待客户端接收数据报吗?
I suppose that opposite example is TCP communication where we have connection and guaranted delivery of data. 我想相反的例子是TCP通信,其中我们具有连接并保证了数据的传递。

Add: 加:
The exact sentence in question is: "Send operation is asynchronous and reading operation is blocking." 确切的句子是:“发送操作是异步的,读取操作正在阻塞。”
Relating to send and receive methods of DatagramSocket class. 与DatagramSocket类的发送和接收方法有关。

There's nothing in the javadocs that says this method (or any method of this class) is asynchronous. javadocs中没有任何东西可以说此方法(或此类的任何方法)是异步的。 When this method returns, the packet has been queued up to send by the OS. 当此方法返回时,数据包已排队等待由OS发送。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM