mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
JavaScript: Add basic model of client-side socket.io API.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
var sock = require("socket.io-client")("ws://localhost");
|
||||
require("socket.io-client").connect("http://example.com/foo/bar?q=v#abc");
|
||||
|
||||
sock.on('message', (x, y) => {
|
||||
console.log(x, y);
|
||||
})
|
||||
|
||||
sock.on(eventName(), (msg) => {});
|
||||
|
||||
sock.on('data', (x, cb) => {
|
||||
cb("received");
|
||||
});
|
||||
|
||||
sock.emit('data', "hi", "there");
|
||||
|
||||
sock.write("do you copy?", () => {});
|
||||
Reference in New Issue
Block a user