Exercises

WebSocket Protocol and Real-Time Communication

Explore how WebSockets enable persistent, bidirectional communication between browsers and servers. This quiz covers the opening handshake, secure connections, browser events, message flow, backpressure, close codes, security checks, and horizontal scaling. Questions combine practical scenarios with protocol concepts to assess skills useful when building real-time chats, dashboards, games, and notification systems.

Answer the questions below and check the explanation for each answer.

0/5 answered

  1. 1

    How does a server calculate the Sec-WebSocket-Accept handshake value?

  2. 2

    Which HTTP status code belongs in the server response shown in the diagram?

    Question 2
  3. 3

    What type does event.data normally contain for a binary message when binaryType is set to blob?

  4. 4

    The diagram shows bufferedAmount increasing rapidly. What should the application do?

    Question 4
  5. 5

    Which server-side control best addresses the cross-site WebSocket risk illustrated?

    Question 5

Video Courses

Courses related to this topic

See all video courses

Download the App now to have access to + 5000 free courses, exercises, certificates and lots of content without paying anything!

  • 100% free online courses from start to finish

    Thousands of online courses in video, ebooks and audiobooks.

  • More than 60 thousand free exercises

    To test your knowledge during online courses

  • Valid free Digital Certificate with QR Code

    Generated directly from your cell phone's photo gallery and sent to your email

Cursa app on the ebook screen, the video course screen and the course exercises screen, plus the course completion certificate