简体   繁体   English

TCP文件传输窗口大小

[英]TCP file Transfer window size

I'm trying to reverse engineer an application, and i need help understanding how TCP window size works. 我正在尝试对应用程序进行逆向工程,我需要帮助来了解TCP窗口大小如何工作。 My MTU is 1460 My application transfers a file using TCP from point A to B. I know the following: 我的MTU是1460我的应用程序使用TCP从A点到B点传输文件。我知道以下几点:

  • The file is split into segments of size 8K 文件分为大小为8K的段
  • Each segment is compressed 每个段都被压缩
  • Then each segment is sent to point B over TCP. 然后,每个段都通过TCP发送到B点。 These segment for a text file can be of size 148 Bytes, and for a pdf 6000 Bytes. 文本文件的这些段的大小为148字节,而pdf为6000字节。

For a text file, am i supposed to see the segments of 148 attached to one another to form one large TCP stream? 对于一个文本文件,我是否应该看到148的段相互连接以形成一个大的TCP流? and then it is split according to the Window Size? 然后根据窗口大小进行拆分?

Any help is appreciated. 任何帮助表示赞赏。

The receiver application should see the data in teh same way, the sender application sent it. 接收方应用程序应以相同的方式查看数据,发送方应用程序将其发送。 TCP uses byte-streaming and so it collects all the bytes in an in-order manner and delivers it to the application. TCP使用字节流,因此它以有序方式收集所有字节并将其交付给应用程序。 MTU is largely an internal semantics to TCP and does not take into application-layer packet boundaries. MTU在很大程度上是TCP的内部语义,并且不考虑应用程序层数据包边界。 If TCP has enough data to send in its send buffer (each TCP socket has its own send buffer, btw), then it will package its next segment worth MTU size and sends it; 如果TCP的数据足以在其发送缓冲区中发送(每个TCP套接字都有其自己的发送缓冲区btw),则它将打包其下一个MTU大小的段并发送; to be more precise, it deducts TCP and IP header from the MTU size. 更准确地说,它从MTU大小中减去TCP和IP标头。

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

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