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


  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


  5. How many WebSocket events are available?

  6. A.

     2

    B.

     3

    C.

     4

    D.

     5


  7. Which method is used to close the WebSocket?

  8. A.

     Socket.flush()

    B.

     Socket.close()

    C.

     Socket.Close()

    D.

     Socket.dispose()


  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


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

  12. A.

     onopen

    B.

     readyState

    C.

     onmessage

    D.

     ready


  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


  15. How will you transmit data using the connection?

  16. A.

     send(data)

    B.

     Socket.send(“data”)

    C.

     Socket.send(data)

    D.

     Socket(data)


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

  18. A.

     open

    B.

     close

    C.

     error

    D.

     deny


  19. What does an History object contain?

  20. A.

     URL

    B.

     Parameters

    C.

     Attribute values

    D.

     Property