什么是协议栈?

发布于 2024-08-09 03:05:45 字数 102 浏览 3 评论 0原文

当我遇到一些协议实现时,我多次听到这个术语,但无法想象“协议”与“堆栈”有何关系?这里使用的栈字面意思是Stack数据结构吗?如果是这样,为什么我们需要在客户端和服务器上使用协议栈进行通信。

I heard this term many times when I came across some protocol implementations, but could not imagine how 'protocol' relates to 'stack'? Is the stack used here literally a Stack data structure? If so why do we require stacks of protocols at client and server for communication.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

逆蝶 2024-08-16 03:05:45

TCP 是建立在IP 之上的。

IP是建立在以太网之上的。

以太网是建立在电压电平和时序之上的。

因此,TCP 堆栈是使用 TCP 所需的堆栈。

TCP is built on IP.

IP is built on Ethernet.

Ethernet is built on voltage levels and timings.

So a TCP Stack is the stack of stuff you need to use TCP.

箹锭⒈辈孓 2024-08-16 03:05:45

从这个意义上说,“堆栈”与堆栈数据结构无关 - 它仅指每个协议如何构建在其下面的协议之上。

In this sense, "stack" is unrelated to the stack data structure - it merely refers to how each protocol is built upon those below it.

风铃鹿 2024-08-16 03:05:45

它参考了网络的分层方法。还记得 OSI 参考模型吗? TCP/IP 模型?基本上,您将网络分解为多个层,每个层都在从硬件到应用程序的不同抽象级别上解决网络问题。

每个层都有自己的一组协议,每个较高层都使用较低层来执行其工作。就像 TCP(传输层)如何使用 IP(网络层)发送其帧一样。当您采用网络中使用的所有协议来移动位时,您将它们一个一个地“堆叠”在另一个之上。应用程序只能看到堆栈顶部的协议。

Its a reference to the layering approach to networking. Remember the OSI Reference Model? TCP/IP Model? Basically you break down the network into layers and each layer tackles the problem of networking at a different level of abstraction from the hardware to the application.

Each layer has its own set of protocols and each higher layer uses the lower layer to carry out its job. Like how TCP (transport Layer) uses IP (Network Layer) to send its Frames. When you take all the protocols used in a network to move bits, you "stack" them one on top of the other. The application only sees the protocol at the top of the stack.

嘿咻 2024-08-16 03:05:45

“协议栈”是指所使用的具体实现。例如,tcp 框架通常称为“tcp 堆栈”。这里堆栈用作指示框架的各个“部分”的术语。

"Protocol stack" refers to the specific implementation used. So for example the tcp framework is usually referred to as the "tcp stack". Here stack is used as a term indicating the various "pieces" of the framework.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文