aotrautils-srv 0.0.245 → 0.0.246
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (19/08/2022-00:28:12)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -4827,7 +4827,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
4827
4827
|
|
|
4828
4828
|
|
|
4829
4829
|
|
|
4830
|
-
/*utils SERVER library associated with aotra version : «1_29072022-2359 (
|
|
4830
|
+
/*utils SERVER library associated with aotra version : «1_29072022-2359 (19/08/2022-00:28:12)»*/
|
|
4831
4831
|
/*-----------------------------------------------------------------------------*/
|
|
4832
4832
|
|
|
4833
4833
|
|
|
@@ -5328,16 +5328,16 @@ WebsocketImplementation={
|
|
|
5328
5328
|
clientSocket.clientId=getUUID();
|
|
5329
5329
|
|
|
5330
5330
|
|
|
5331
|
-
// DBG
|
|
5332
|
-
console.log("nodeServerInstance.receptionEntryPoints.length:",nodeServerInstance.receptionEntryPoints.length);
|
|
5331
|
+
// // DBG
|
|
5332
|
+
// console.log("nodeServerInstance.receptionEntryPoints.length:",nodeServerInstance.receptionEntryPoints.length);
|
|
5333
5333
|
|
|
5334
5334
|
|
|
5335
5335
|
|
|
5336
5336
|
// We execute the events registration listeners entry points:
|
|
5337
5337
|
foreach(nodeServerInstance.receptionEntryPoints,(receptionEntryPoint,i)=>{
|
|
5338
5338
|
|
|
5339
|
-
// DBG
|
|
5340
|
-
console.log("ENTRY POINT ["+i+"] !");
|
|
5339
|
+
// // DBG
|
|
5340
|
+
// console.log("ENTRY POINT ["+i+"] !");
|
|
5341
5341
|
|
|
5342
5342
|
receptionEntryPoint.execute(clientSocket);
|
|
5343
5343
|
});
|
|
@@ -5373,32 +5373,33 @@ WebsocketImplementation={
|
|
|
5373
5373
|
|
|
5374
5374
|
clientSocket.isConnectionAlive=false;
|
|
5375
5375
|
|
|
5376
|
+
|
|
5377
|
+
if(!WebsocketImplementation.useSocketIOImplementation) clientSocket.ping();
|
|
5376
5378
|
// OLD :
|
|
5377
|
-
// if(!WebsocketImplementation.useSocketIOImplementation) clientSocket.ping();
|
|
5378
5379
|
// else clientSocket.emit("ping");
|
|
5379
|
-
|
|
5380
|
-
nodeServerInstance.send("protocol",{type:"ping"});
|
|
5380
|
+
else nodeServerInstance.send("protocol",{type:"ping"});
|
|
5381
5381
|
|
|
5382
5382
|
|
|
5383
5383
|
}, nodeServerInstance.clientPingIntervalMillis);
|
|
5384
5384
|
|
|
5385
5385
|
|
|
5386
|
+
if(!WebsocketImplementation.useSocketIOImplementation){
|
|
5387
|
+
clientSocket.on("pong",()=>{
|
|
5388
|
+
clientSocket.isConnectionAlive=true;
|
|
5389
|
+
});
|
|
5390
|
+
}else{
|
|
5386
5391
|
// // OLD :
|
|
5387
|
-
// if(!WebsocketImplementation.useSocketIOImplementation){
|
|
5388
|
-
// clientSocket.on("pong",()=>{
|
|
5389
|
-
// clientSocket.isConnectionAlive=true;
|
|
5390
|
-
// });
|
|
5391
|
-
// }else{
|
|
5392
5392
|
// clientSocket.on("ping",()=>{
|
|
5393
5393
|
// clientSocket.isConnectionAlive=true;
|
|
5394
5394
|
// });
|
|
5395
|
-
// }
|
|
5396
5395
|
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5396
|
+
nodeServerInstance.receive("protocol",(message)=>{
|
|
5397
|
+
if(message.type!=="pong") return;
|
|
5398
|
+
clientSocket.isConnectionAlive=true;
|
|
5399
|
+
});
|
|
5400
|
+
|
|
5401
|
+
}
|
|
5402
|
+
|
|
5402
5403
|
|
|
5403
5404
|
|
|
5404
5405
|
});
|
|
@@ -5640,14 +5641,15 @@ WebsocketImplementation={
|
|
|
5640
5641
|
|
|
5641
5642
|
|
|
5642
5643
|
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5644
|
+
if(WebsocketImplementation.useSocketIOImplementation){
|
|
5645
|
+
nodeClientInstance.receive("protocol",(message)=>{
|
|
5646
|
+
if(message.type!=="ping") return;
|
|
5647
|
+
nodeClientInstance.send("protocol",{type:"pong"});
|
|
5648
|
+
|
|
5649
|
+
// DBG
|
|
5650
|
+
lognow("DEBUG : CLIENT : Pong sent.");
|
|
5651
|
+
});
|
|
5652
|
+
}
|
|
5651
5653
|
|
|
5652
5654
|
|
|
5653
5655
|
|
|
@@ -5785,15 +5787,15 @@ WebsocketImplementation={
|
|
|
5785
5787
|
|
|
5786
5788
|
|
|
5787
5789
|
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
}
|
|
5790
|
+
if(WebsocketImplementation.useSocketIOImplementation){
|
|
5791
|
+
browserInstance.receive("protocol",(message)=>{
|
|
5792
|
+
if(message.type!=="ping") return;
|
|
5793
|
+
browserInstance.send("protocol",{type:"pong"});
|
|
5794
|
+
|
|
5795
|
+
// DBG
|
|
5796
|
+
lognow("DEBUG : CLIENT : Pong sent.");
|
|
5797
|
+
});
|
|
5798
|
+
}
|
|
5797
5799
|
|
|
5798
5800
|
|
|
5799
5801
|
return browserInstance;
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.246",
|
|
4
4
|
"main": "aotrautils-srv.build.js",
|
|
5
5
|
"description": "A library for vanilla javascript utils (server-side) used in aotra javascript CMS",
|
|
6
6
|
"author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",
|