⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tcpandudp.txt

📁 SSD8练习3 传上去大家参考参考 研究研究
💻 TXT
字号:

Answers:

1.How many packets should it take to send one byte over UDP?
From the above message, there are ((5479-4406)/1000), about one packet to send one byte.

2.How many packets does it take to establish a TCP connection, send one byte, and close the connection?
There are ((17767-13719)+(20622-14605))/1000, about 10 packets to send one byte, and close the connection.

3.Are the results of your tests what you expected? If not, what might account for the difference?
The result of the TCP connection is not what I expected. As I know to begin a connection, there would be a three-way handshake, and then this process would send three packets; after that to close a connection, there would also send three packets. That means there would use 6 packets to begin and close a connection, and then to send one byte, there would be 2 more packets. But the results above shows that there are 10 packets. I thought may be the process is more complex than I expected, and it may also depends on the program I write, the detail of the process, to send and receive a one byte to and from the server. UDP use only one packet to send one byte, it is unreliable. But TCP will make sure that the connection is established, so it send much more packets to start and end the connection in the whole process.

4.You are to measure and record UDP and TCP round trip times. How do the round trip times compare?
UDP:
1000 packets have been received.
The average time is : 1.943ms
The times packets have been resend is 0.
TCP:
The total packages that have been received is 1000.
The total packates that have been lost is 0.
The average time is : 4.396ms
The round trip times of the UDP is 1.943ms compare to the TCP is 4.396ms. The UDP spend much less time than the TCP to send one byte.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -