1.

Messages from the server are received by ____(a) onmessage(b) send(c) arrayBuffer(d) blobI had been asked this question in exam.My doubt is from Web Socket Communications topic in section HTML Markup, Forms, Video, Audio & Other Multimedia of HTML

Answer»

Correct answer is (a) onmessage

To explain I would say: onmessage function is USED for receiving MESSAGES from the SERVER. E.g. memeDocket.onmessage = function (eve) { console.log(eve.DATA); }. For sending data as a string we use ArrayaBuffer and Blob.



Discussion

No Comment Found

Related InterviewSolutions