adplus-dvertising
frame-decoration

Question

Which method is used to close the WebSocket?

a.

Socket.flush()

b.

Socket.close()

c.

Socket.Close()

d.

Socket.dispose()

Posted under JavaScript

Answer: (b).Socket.close()

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which method is used to close the WebSocket?

Similar Questions

Discover Related MCQs

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

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

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

Q. How will you transmit data using the connection?

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

Q. What does an History object contain?

Q. The history object is a part of which object?

Q. How many methods are there in the History object?

Q. What is the purpose of the method forward()?

Q. How will you update the URL displayed in the location bar?

Q. How do you add a particular state to the browsing history?

Q. What does the pushState() method do?

Q. Which of the following method is used to replace the current history state instead of adding a new state to the browsing history?

Q. How many parameters does the replaceState() method take?

Q. What is the purpose of the event window.onpopstate?

Q. R is an extension of which of the following language?

Q. Which of the following is/are statistical languages?

Q. Which of the following is a successor to the S language?

Q. What are the purposes R can be used for?

Q. What type of language is generally used to collect the data?