|
Post by account_disabled on Apr 28, 2024 3:32:00 GMT
每条 连接只能有两个端点 每条 连接只能是点对点 对 提供可靠交付的服务。通过 连接传送的数据无差错不丢失不重复并且按序到达。提供全双工通信。允许通信双方的应用进程在任何时候都能发送数据。连接的两端都设有发送缓存和接收双方通信的数据。在发送时应用程序在把数据传送给 的缓存后就可以做自己的事而 在合适的时候把数据发送出去 是面向字节流的 中的 流 指的是流入到进程或从进程流出的字节序列 图 指出 和 在发送报文时所采用的方式完全不同。并不关心应用进程次把多长的报文发送到 的缓存中而是根据对方给出的窗口值和当前网络拥塞的程度来决定个报文段应包含多少个字节 发送的报文长度是应用进程给出的。 如果应用进程传送到 缓存的数据块太大 就可以把它划分短些再传送。如果应用程序次只发来个字节 也可以等到积累有足够多的字节后再构成报文段发送出去。的连接 每条 连接有两个端点这两个端点叫做套接字 套接字 地址 端 新加坡电报数据库 口号 每条 连接唯地被通信两端的两个端点 即两个套接字 所确定。即 连接 这里 和 分别是两个端点主机的 地址而 和 分别是两个端点主机中的端口号。和 主要区别 是有连接的 是无连接的 提供可靠交付的服务 不保证可靠交付 是面向字节流的 是面向报文的 连接是对的 连接可以是对对多和多对多的通信 可靠传输的工作原理 停止等待协议 停止等待 就是每发送完个分组就停止发送等待对方的确认。 在收到确认后再发送下个分组。使用上述的确认和重传机制我们就可以再不可靠的传输网络上实现可靠的通信。为了提高传输效率发送方可以不使用低效率的停止等待协议而是采用流水线传输。流水线传输就是发送方可连续多个分组不必每发完个分组就停顿下来等待对方的确认。当使用流水线传输时就要使用连续的 协议和滑动窗口协议 连续 协议 连续 协议规定发送方每收到个确认就把发送窗口向前滑动个分组的位置。接收方般都是采用积累确认的方式。即接收方不必对收到的分组逐个发送确认而是在收到几个分组后对 按序到达的最后个分组发送确认这就表示到这个分组为止的所有分组都已正确收到了。累积确认优点容易实现即使确认丢失也不必重传。
|
|