1.

Which method is used to close the WebSocket?(a) Socket.flush()(b) Socket.close()(c) Socket.Close()(d) Socket.dispose()This question was posed to me during an interview.The question is from Web Sockets topic in section Sockets of JavaScript

Answer»

Correct option is (b) Socket.CLOSE()

The explanation: The Socket.close() is used to close the WebSocket. The Close method CLOSES the REMOTE host connection and releases all managed and unmanaged resources associated with the Socket. WebSocket is a computer communications protocol, PROVIDING full-duplex communication channels over a SINGLE TCP connection.



Discussion

No Comment Found

Related InterviewSolutions