Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which OSI layer does WebSocket Protocol lay on?

Tags:

I was wondering if it is layer 7 for websocket as the application is actually the browser.

like image 708
TheOneTeam Avatar asked Jan 03 '13 05:01

TheOneTeam


People also ask

Is WebSocket in application layer protocol?

HTTP, SSL, HTTPS, WebSockets, etc. are all application layer protocols.

Is WebSocket on top of TCP?

Conceptually, WebSockets is a layer on top of TCP that: Adds a web origin-based security model for browsers. Adds an addressing and protocol naming mechanism to support multiple services on one port and multiple host names on one IP address.

What protocol is used in WebSocket?

1.7.The WebSocket protocol is an independent TCP-based protocol. Its only relationship to HTTP is that its handshake is interpreted by HTTP servers as an Upgrade request. By default the WebSocket protocol uses port 80 for regular WebSocket connections and port 443 for WebSocket connections tunneled over TLS [RFC2818].

What OSI layer is protocol?

Layer 4, the Transport Layer This layer transmits data from source to destination node. It uses the most important protocols of OSI protocol family, which are: Transmission Control Protocol (TCP), UDP, SPX, DCCP and SCTP.


1 Answers

Websocket depends on TCP (OSI#4) and only the handshake phase is initialized by HTTP (OSI#7) 1. Although it uses TCP port 80 only.

According to the runtime behavior, I have to say WebSocket should be a special OSI#7 protocol. Then we can put SSL/TLS into OSI#6 (see wikipedia), and the implementation inside browser into OSI#5.

like image 108
shawnzhu Avatar answered Sep 20 '22 18:09

shawnzhu