mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
18 lines
407 B
JavaScript
18 lines
407 B
JavaScript
var sock = require("socket.io-client")("ws://localhost");
|
|
var sock2 = 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('event', (x, cb) => {
|
|
cb("received");
|
|
});
|
|
|
|
sock.emit('data', "hi", "there");
|
|
|
|
sock.write("do you copy?", () => {});
|
|
|
|
sock2.on('message', require('./handler')); |