TCP可以通过UDP实现吗? [英] Can TCP be implemented via UDP?

查看:113
本文介绍了TCP可以通过UDP实现吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的想法.我听说过一些软件,据我所知,它使用 UDP 传输文件以减少 TCP 数据包中的开销.

I had a strange idea. I heard of software which from my understanding uses UDP to transfer files decreasing the overhead found in TCP packets.

如果我的应用程序需要 TCP 并且我的 LAN 已设置软件以与海岸另一边的另一个数据中心通信,并在其一端设置软件.是否可以通过UDP发送实际数据而不是在两端模拟TCP?

If my app requires TCP and my LAN has software set up to communicate with another datacenter on the other side of the coast with software setup on their end. Would it be possible to send the actual data via UDP but than simulating TCP on both ends?

有人对此类项目有任何想法或信息吗?

Does anyone have any ideas or information about such projects?

推荐答案

如果您问是否可以将 UDP 用作 第 2 层,那么答案是肯定的,有点.有多种协议允许您使用 UDP 传输创建通往另一个网络的隧道,例如 L2TP 甚至 IPsec(带 NAT 穿越).您也可以在应用层执行此操作.

If you're asking if you can use UDP as a Layer 2, then the answer is yes, sort of. There are various protocols that allow you to create a tunnel to another network using a UDP transport, such as L2TP and even IPsec (with NAT traversal). You could also do it at the application layer.

如果您问 TCP 是否可以在 UDP 中实现,答案是否定的.首先,TCP数据包UDP 数据包的格式不兼容.其次,TCP 和 UDP 具有不同的协议编号(见 IP 标头),这意味着发往 UDP 端口的 TCP 流量不会传递到正确的上层协议.

If you're asking if TCP can be implemented in UDP, the answer is no. First, TCP packets and UDP packets have an incompatible format. Second, TCP and UDP have different protocol numbers (seen in the IP header) which means that TCP traffic destined for a UDP port would not be passed to the correct upper-layer protocol.

这篇关于TCP可以通过UDP实现吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆