GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Java-Interview/MD/TCP-IP.md at master · ManCoding/Java-Interview

Expand file tree

/

TCP-IP.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
24 lines (16 loc) · 1.06 KB
/

TCP-IP.md

Copy path

File metadata and controls

24 lines (16 loc) · 1.06 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

TCP/IP 协议

TCP/IP 总结起来就三个要点

  • 三次握手的意义。
  • 超时重发。
  • 滑动窗口。

三次握手

如图类似:

  1. 发送者问接收者我发消息了,你收到了嘛?
  2. 接收者回复发送者我收到了,你发消息没问题,我收消息也没问题。但我不知道我的发消息有没有问题,你收到了回复我下。
  3. 发送者告诉接收者,我收到你的消息了,你发消息没问题。通信成功我们开始工作吧!

超时重发

当发送者向接收者发包后,如果过了一段时间(超时时间)依然没有收到消息,就当做本次包丢失,需要重新补发。

并且如果一次性发了三个包,只要最后一个包确认收到之后就默认前面两个也收到了。

滑动窗口

假设一次性发送包的大小为3,那么每次可以发3个包,而且可以边发边接收,这样就会增强效率。这里的 3 就是滑动窗口的大小,这样的发送方式也叫滑动窗口协议。

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.