Home / CSE / Javascript - CS :: Sockets

CSE :: Javascript - CS

  1. Which of the following is a stateless protocol?

  2. A.

     HTML

    B.

     XHTML

    C.

     HTTP

    D.

     All of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. What does the value 2 of the WebSocket attribute Socket.readyState indicate?

  4. A.

     Closed connection

    B.

     Handshake connection

    C.

     Unestablished connection

    D.

     Established connection and communication is possible

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. How many WebSocket events are available?

  6. A.

     2

    B.

     3

    C.

     4

    D.

     5

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. Which method is used to close the WebSocket?

  8. A.

     Socket.flush()

    B.

     Socket.close()

    C.

     Socket.Close()

    D.

     Socket.dispose()

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. How does the client and the server communicate following the rules defined by the WebSocket protocol?

  10. A.

     Long-lived TCP Socket

    B.

     Short-lived TCP Socket

    C.

     UDP Socket

    D.

     HTTP Socket

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. Which of the following are not a socket property?

  12. A.

     onopen

    B.

     readyState

    C.

     onmessage

    D.

     ready

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. How can we check the subprotocol being used by the client?

  14. A.

     subprotocol property

    B.

     protocol property

    C.

     clientprotocol property

    D.

     none of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. How will you transmit data using the connection?

  16. A.

     send(data)

    B.

     Socket.send(“data”)

    C.

     Socket.send(data)

    D.

     Socket(data)

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Which of the following is not a WebSocket event?

  18. A.

     open

    B.

     close

    C.

     error

    D.

     deny

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. What does an History object contain?

  20. A.

     URL

    B.

     Parameters

    C.

     Attribute values

    D.

     Property

    View Answer

    Workspace

    Discuss Discuss in Forum