简体   繁体   中英

Is UDP (in Java or otherwise) full duplex by default?

即,我能够使用两个不同的线程读取和写入相同的套接字,因为我正在以数据报的形式进行所有通信?

UDP, in the right circumstances, can be considered fully duplex, but by itself, it is not, whereas TCP, on the other hand, is always fully duplex.

UDP is a fire-and-forget, best-effort protocol, but the upper layers can use it in a fully duplex fashion.

TCP requires handshaking and other two-way communication.

UDP IS in fact fully duplex.

You can have a server listening from as well as writing to the same socket

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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