-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
61 lines (55 loc) · 2.26 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// const eio = require('engine.io-client');
// const http = require('http');
// const keepAliveAgent = new http.Agent({ keepAlive: true });
const opts = {
query: {
EIO: 3,
transport: 'websocket',
sid: 'V1Tcpjnrg9kspYMECBLS'
},
path: '/socket.io',
binaryType: 'arraybuffer',
transports: ['websocket'],
// protocols: [
// ],
// agent: keepAliveAgent,
// upgrade: 'websocket',
// forceJSONP:
// jsonp
// forceBase64
// enablesXDR
// timestampRequests
// policyPort
// transportOptions
// rememberUpgrade
// key:
passphrase: 'cookie',
// cert (String):
// ca (String|Array):
// ciphers (String):
// rejectUnauthorized (Boolean):
// perMessageDeflate (Object|Boolean):
// threshold (Number):
// extraHeaders: {
// 'Cookie': [
// 'XSRF-TOKEN=NI2JlCKF90aE0sJZD9ZzujtdsUqNYSBYxzlTsvdSUe35ZzdtVRGqYFr0kdGxbfc5gUOkR9RGp20GVKza; path=/; expires=Tue, 07-Apr-2015 18:18:08 GMT; secure; HttpOnly',
// 'XSRF-TOKEN=NI2JlCKF90aE0sJZD9ZzujtdsUqNYSBYxzlTsvdSUe35ZzdtVRGqYFr0kdGxbfc5gUOkR9RGp20GVKza; path=/; expires=Tue, 07-Apr-2015 18:18:08 GMT; secure; HttpOnly',
// 'XSRF-TOKEN=NI2JlCKF90aE0sJZD9ZzujtdsUqNYSBYxzlTsvdSUe35ZzdtVRGqYFr0kdGxbfc5gUOkR9RGp20GVKza; path=/; expires=Tue, 07-Apr-2015 18:18:08 GMT; secure; HttpOnly',
// 'XSRF-TOKEN=NI2JlCKF90aE0sJZD9ZzujtdsUqNYSBYxzlTsvdSUe35ZzdtVRGqYFr0kdGxbfc5gUOkR9RGp20GVKza; path=/; expires=Tue, 07-Apr-2015 18:18:08 GMT; secure; HttpOnly',
// 'XSRF-TOKEN=NI2JlCKF90aE0sJZD9ZzujtdsUqNYSBYxzlTsvdSUe35ZzdtVRGqYFr0kdGxbfc5gUOkR9RGp20GVKza; path=/; expires=Tue, 07-Apr-2015 18:18:08 GMT; secure; HttpOnly',
// 'XSRF-TOKEN=NI2JlCKF90aE0sJZD9ZzujtdsUqNYSBYxzlTsvdSUe35ZzdtVRGqYFr0kdGxbfc5gUOkR9RGp20GVKza; path=/; expires=Tue, 07-Apr-2015 18:18:08 GMT; secure; HttpOnly',
// ]
// }
// onlyBinaryUpgrades (Boolean):
// forceNode (Boolean):
// localAddress (String):
}
const socket = new eio.Socket('wss://wsprice.alpari.io', opts);
console.log(socket)
socket.on('open', function () {
console.log('connected')
socket.on('RealData', function (data) {
console.log(data)
});
socket.on('close', function () { });
});