52ky 发表于 2022-4-29 08:30:37

WebSocket:沙盒里的TCP.pdf

之前讲TCP/IP协议栈的时候,说过有一个“TCP Socket”,其实就是一个功能接口,通过它可以使用TCP/IP协议栈在传输层收发数据。
那么,您知道还有一种叫做“WebSocket”的东西吗?
单从名字来看,“Web”指的是HTTP,“Socket”是socket调用,那么这两个是什么意思呢?
所谓“字面意思”,你大概可以猜到,“WebSocket”是运行在“Web”上的,它是HTTP上的Socket通信规范,提供与“TCP Socket”类似的功能,使用它可以像“TCP Socket” "
Socket”调用下层协议栈任意发送和接收数据。

(When talking about TCP / IP protocol stack, I said that there is a "TCP socket", which is actually a functional interface through which you can use TCP / IP protocol stack to send and receive data at the transport layer.So, do you know there is another thing called "websocket"?From the name alone, "Web" refers to HTTP and "socket" refers to socket call. What do these two mean?The so-called "literal meaning", you can probably guess that "websocket" runs on the "Web". It is a socket communication specification over HTTP, which provides functions similar to "TCP socket". It can be used like "TCP socket"“"Socket" calls the lower layer protocol stack to send and receive data arbitrarily.)




页: [1]
查看完整版本: WebSocket:沙盒里的TCP.pdf