socket.addEventListener('open', function (event) { socket.send('Hello Server!');});socket.onopen = function(event) { socket.send('Hello Server!');};'onopen' is a property not a method
socket.addEventListener('open', function (event) {
socket.send('Hello Server!');
});
socket.onopen = function(event) {
socket.send('Hello Server!');
};
'onopen' is a property not a method