博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
tcp协议_TCP协议
阅读量:2507 次
发布时间:2019-05-11

本文共 2424 字,大约阅读时间需要 8 分钟。

tcp协议

TCP means Transfer Control Protocol, and it’s the basis of the Web and other applications like Email.

TCP表示传输控制协议 ,它是Web和其他应用程序(如电子邮件)的基础。

Defined in in 1981, TCP is one of the oldest pillars of the Internet.

TCP在1981年的中定义,是Internet上最古老的Struts之一。

TCP sits on top of the Internet Protocol (IP) and builds a base system upon which application-level protocols like HTTP, FTP, IMAP and many others.

TCP位于Internet协议(IP)之上,并构建了一个基础系统,基于该系统的应用程序级协议如HTTP,FTP,IMAP和许多其他协议。

TCP, contrary to IP and UDP, is connection oriented.

与IP和UDP相反,TCP是面向连接的

Before transmission can happen over TCP, a connection must be established. Data is sent, in form of little packets, and when the communication ends the connection is closed.

必须先建立连接,然后才能通过TCP进行传输。 数据以小包的形式发送,当通信结束时,连接关闭。

When data is transmitted over TCP, there’s a relatively complex workflow called handshake that must happen.

当数据通过TCP传输时,必须进行一个称为握手的相对复杂的工作流程。

I will not go into the details here, but this handshake allows the end-to-end connection to happen, and this makes sure TCP can provide one of its peculiar features: reliability. Using TCP, we can always know if a packet the sender sent was received correctly by the receiver.

我不会在这里详细介绍,但是这种握手可以实现端到端的连接,并且可以确保TCP可以提供其独特的功能之一:可靠性。 使用TCP,我们总是可以知道发送方发送的数据包是否被接收方正确接收。

If a packet gets lost, the protocol is able to handle it and the packet is re-sent.

如果数据包丢失,则协议可以对其进行处理,然后重新发送该数据包。

On the IP protocol, connections happen from computer to computer. In TCP, a connection happens form process to process, using a the concept of ports.

在IP协议上,计算机之间建立连接。 在TCP中,使用端口的概念在过程之间进行连接。

The port, associated to an IP address, allows to uniquely identify a process on a computer. Like this:

与IP地址关联的端口允许唯一地标识计算机上的进程。 像这样:

localhost:8080

localhost:8080

or

要么

google.com:1234

google.com:1234

Each application protocol has a default port. For example HTTP has 80, HTTPS has 443 and FTP has 21. This is why you don’t usually have to specify the port, in the browser.

每个应用程序协议都有一个默认端口。 例如,HTTP具有80,HTTPS具有443,FTP具有21。这就是为什么您通常不必在浏览器中指定端口的原因。

Programs are not required to use the default, this is why especially on your local computer, you might see ports like 1313 or 8080 when you start a new application.

程序不需要使用默认值,这就是为什么特别是在本地计算机上,启动新应用程序时可能会看到端口1313或8080。

Port numbers range from 1 to 65535 (the port number is a 16 bits unsigned, which corresponds to 2^16 possible values).

端口号的范围是1到65535(端口号是16位无符号的,对应于2 ^ 16个可能的值)。

翻译自:

tcp协议

转载地址:http://xomgb.baihongyu.com/

你可能感兴趣的文章
五步git操作搞定Github中fork的项目与原作者同步
查看>>
git 删除远程分支
查看>>
删远端分支报错remote refs do not exist或git: refusing to delete the current branch解决方法
查看>>
python multiprocessing遇到Can’t pickle instancemethod问题
查看>>
APP真机测试及发布
查看>>
通知机制 (Notifications)
查看>>
10 Things You Need To Know About Cocoa Auto Layout
查看>>
一个异步网络请求的坑:关于NSURLConnection和NSRunLoopCommonModes
查看>>
iOS 如何放大按钮点击热区
查看>>
ios设备唯一标识获取策略
查看>>
获取推送通知的DeviceToken
查看>>
Could not find a storyboard named 'Main' in bundle NSBundle
查看>>
CocoaPods安装和使用教程
查看>>
Beginning Auto Layout Tutorial
查看>>
block使用小结、在arc中使用block、如何防止循环引用
查看>>
iPhone开发学习笔记002——Xib设计UITableViewCell然后动态加载
查看>>
iOS开发中遇到的问题整理 (一)
查看>>
为什么你的App介绍写得像一坨翔?
查看>>
RTImageAssets插件--@3x可自动生成@2x图片
查看>>
iOS开发的一些奇巧淫技
查看>>