mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
JavaScript: Add basic model of client-side socket.io API.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
| client2.js:4:1:6:2 | sock.on ... y);\\n}) | client2.js:1:12:1:56 | require ... lhost") |
|
||||
| client2.js:8:1:8:33 | sock.on ... => {}) | client2.js:1:12:1:56 | require ... lhost") |
|
||||
| client2.js:10:1:12:2 | sock.on ... d");\\n}) | client2.js:1:12:1:56 | require ... lhost") |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from SocketIOClient::ReceiveNode rn
|
||||
select rn, rn.getSocket()
|
||||
@@ -0,0 +1,4 @@
|
||||
| client2.js:4:1:6:2 | sock.on ... y);\\n}) | client2.js:4:21:4:21 | x |
|
||||
| client2.js:4:1:6:2 | sock.on ... y);\\n}) | client2.js:4:24:4:24 | y |
|
||||
| client2.js:8:1:8:33 | sock.on ... => {}) | client2.js:8:23:8:25 | msg |
|
||||
| client2.js:10:1:12:2 | sock.on ... d");\\n}) | client2.js:10:18:10:18 | x |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from SocketIOClient::ReceiveNode rn
|
||||
select rn, rn.getAReceivedItem()
|
||||
@@ -0,0 +1 @@
|
||||
| client2.js:10:1:12:2 | sock.on ... d");\\n}) | client2.js:10:21:10:22 | cb |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from SocketIOClient::ReceiveNode rn
|
||||
select rn, rn.getAck()
|
||||
@@ -0,0 +1,2 @@
|
||||
| client2.js:4:1:6:2 | sock.on ... y);\\n}) | message |
|
||||
| client2.js:10:1:12:2 | sock.on ... d");\\n}) | data |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from SocketIOClient::ReceiveNode rn
|
||||
select rn, rn.getEventName()
|
||||
@@ -0,0 +1,2 @@
|
||||
| client2.js:14:1:14:32 | sock.em ... there") | client2.js:1:12:1:56 | require ... lhost") | / |
|
||||
| client2.js:16:1:16:36 | sock.wr ... => {}) | client2.js:1:12:1:56 | require ... lhost") | / |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from SocketIOClient::SendNode sn
|
||||
select sn, sn.getSocket(), sn.getNamespacePath()
|
||||
@@ -0,0 +1,3 @@
|
||||
| client2.js:14:1:14:32 | sock.em ... there") | client2.js:14:19:14:22 | "hi" |
|
||||
| client2.js:14:1:14:32 | sock.em ... there") | client2.js:14:25:14:31 | "there" |
|
||||
| client2.js:16:1:16:36 | sock.wr ... => {}) | client2.js:16:12:16:25 | "do you copy?" |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from SocketIOClient::SendNode sn
|
||||
select sn, sn.getASentItem()
|
||||
@@ -0,0 +1 @@
|
||||
| client2.js:16:1:16:36 | sock.wr ... => {}) | client2.js:16:28:16:35 | () => {} |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from SocketIOClient::SendNode sn
|
||||
select sn, sn.getAck()
|
||||
@@ -0,0 +1,2 @@
|
||||
| client2.js:14:1:14:32 | sock.em ... there") | data |
|
||||
| client2.js:16:1:16:36 | sock.wr ... => {}) | message |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from SocketIOClient::SendNode sn
|
||||
select sn, sn.getEventName()
|
||||
@@ -0,0 +1,5 @@
|
||||
| client1.js:1:1:1:4 | io() | / |
|
||||
| client1.js:2:1:2:23 | io.conn ... sages") | /messages |
|
||||
| client2.js:1:12:1:56 | require ... lhost") | / |
|
||||
| client2.js:2:1:2:73 | require ... v#abc") | /foo/bar |
|
||||
| client3.js:3:1:3:4 | io() | / |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from SocketIOClient::SocketNode sn
|
||||
select sn, sn.getNamespacePath()
|
||||
@@ -0,0 +1,2 @@
|
||||
io();
|
||||
io.connect("/messages");
|
||||
@@ -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?", () => {});
|
||||
@@ -0,0 +1,3 @@
|
||||
import io from "socket.io-client";
|
||||
|
||||
io();
|
||||
Reference in New Issue
Block a user