Can TCP be implemented via UDP?

后端 未结 9 1840
后悔当初
后悔当初 2021-01-31 08:45

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.

If my app requires TCP and

9条回答
  •  没有蜡笔的小新
    2021-01-31 09:14

    Both TCP and UDP are built on top of the IP, but the TCP uses different packet structure and at the layer-2 it is not possible to mimic the TCP using UDP packets.

    Of course, if you have the control on both the source and destination, then it is possible to create a reliable UDP tunnel for the TCP packets. This would require some internal information (packet number, ack/nack flags) in the body of the UDP packet.

    There is an interesting project http://udt.sourceforge.net/

    It is a broadcast-capable reliable file transfer mechanism built on top the UDP.

提交回复
热议问题