I was wondering if it is layer 7 for websocket as the application is actually the browser.
HTTP, SSL, HTTPS, WebSockets, etc. are all application layer protocols.
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.
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].
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With