Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

socketio connect websockets

var ws = new WebSocket('ws://localhost/socket.io/?EIO=3&transport=websocket');
ws.send('42' + JSON.stringify(['hello', 'there']));
// ws.onmessage will get a MessageEvent object with the data property being encoded in the similar way.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #socketio #connect #websockets
ADD COMMENT
Topic
Name
8+3 =