CS FundamentalsHardGATE CS · Product company CS fundamentals
How does a WebSocket connection start?
- A. As a separate UDP flow on port 81
- B. With an HTTP 200 response followed by a new TCP connection
- C. With a DNS SRV lookup and a TLS-only handshake
- D. As an HTTP Upgrade request answered by 101 Switching Protocols
Correct answer: D. As an HTTP Upgrade request answered by 101 Switching Protocols
The opening handshake reuses HTTP so it passes through ports 80/443 and proxies; the server proves it understood by returning Sec-WebSocket-Accept with 101. After that the connection is full-duplex message framing.
More Computer Networks questions
- A REST API creates a resource in response to a POST. Which response is most appropriate?
- Which application protocols use UDP by default? SNMP, NTP, SSH, DHCP
- Uncompressed 1080p video (1920 × 1080 pixels, 24 bits per pixel, 30 frames/s) is sent over a network. What bit rate does it need?
- A 1 Gbps switch forwards a 1500-byte frame. A store-and-forward switch waits for the whole frame; a cut-through switch starts forwarding…
- A signal goes from a ground station up to a geostationary satellite (altitude about 35,786 km) and down to another ground station…
- On a 1 Gbps path with RTT 10 ms, what throughput can one TCP connection reach with a 65,535-byte window, and with the same window scaled…