aotrautils 0.0.317 → 0.0.319

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 (03/12/2022-21:08:03)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (03/12/2022-22:26:44)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -4827,7 +4827,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
4827
4827
 
4828
4828
 
4829
4829
 
4830
- /*utils CLIENT library associated with aotra version : «1_29072022-2359 (03/12/2022-21:08:03)»*/
4830
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (03/12/2022-22:26:44)»*/
4831
4831
  /*-----------------------------------------------------------------------------*/
4832
4832
  /* ## Utility global methods in a browser (htmljs) client environment.
4833
4833
  *
@@ -11410,6 +11410,19 @@ initClient=function(isNodeContext=true, useSocketIOImplementation=/*DEBUG*/false
11410
11410
  if(selfParam) doOnServerConnection.apply(selfParam,[socketToServer]);
11411
11411
  else doOnServerConnection(socketToServer);
11412
11412
  }
11413
+
11414
+ // // Ping handling :
11415
+ // if(useSocketIOImplementation){
11416
+ // nodeClientInstance.receive("protocol",(message)=>{
11417
+ // if(message.type!=="ping") return;
11418
+ // nodeClientInstance.send("protocol",{type:"pong"});
11419
+ //
11420
+ // // DBG
11421
+ // lognow("DEBUG : CLIENT : Pong sent.");
11422
+ // });
11423
+ // }
11424
+
11425
+
11413
11426
  });
11414
11427
 
11415
11428
  // // Errors handling :
@@ -12947,7 +12960,7 @@ createOritaMicroClient=function(url, port, isNode=false){
12947
12960
  };
12948
12961
 
12949
12962
 
12950
- /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (03/12/2022-21:08:03)»*/
12963
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (03/12/2022-22:26:44)»*/
12951
12964
  /*-----------------------------------------------------------------------------*/
12952
12965
 
12953
12966
 
@@ -14175,7 +14188,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
14175
14188
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
14176
14189
 
14177
14190
  AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
14178
- /*utils SERVER library associated with aotra version : «1_29072022-2359 (03/12/2022-21:08:03)»*/
14191
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (03/12/2022-22:26:44)»*/
14179
14192
  /*-----------------------------------------------------------------------------*/
14180
14193
 
14181
14194
 
@@ -15000,7 +15013,18 @@ WebsocketImplementation={
15000
15013
 
15001
15014
  // DBG
15002
15015
  lognow("DEBUG : CLIENT : nodeClientInstance.clientSocket.on(connect)");
15016
+
15003
15017
 
15018
+ // Node client ping handling :
15019
+ if(WebsocketImplementation.useSocketIOImplementation){
15020
+ nodeClientInstance.receive("protocol",(message)=>{
15021
+ if(message.type!=="ping") return;
15022
+ nodeClientInstance.send("protocol",{type:"pong"});
15023
+
15024
+ // DBG
15025
+ lognow("DEBUG : NODE CLIENT : Pong sent.");
15026
+ });
15027
+ }
15004
15028
 
15005
15029
 
15006
15030
  },
@@ -15009,19 +15033,6 @@ WebsocketImplementation={
15009
15033
  };
15010
15034
 
15011
15035
 
15012
-
15013
- if(WebsocketImplementation.useSocketIOImplementation){
15014
- nodeClientInstance.receive("protocol",(message)=>{
15015
- if(message.type!=="ping") return;
15016
- nodeClientInstance.send("protocol",{type:"pong"});
15017
-
15018
- // DBG
15019
- lognow("DEBUG : CLIENT : Pong sent.");
15020
- });
15021
- }
15022
-
15023
-
15024
-
15025
15036
  return nodeClientInstance;
15026
15037
  },
15027
15038
 
@@ -15148,6 +15159,19 @@ WebsocketImplementation={
15148
15159
  else browserInstance.clientSocket.on("connect",doAllOnConnection);
15149
15160
 
15150
15161
 
15162
+
15163
+ // Browser client ping handling :
15164
+ if(WebsocketImplementation.useSocketIOImplementation){
15165
+ browserInstance.receive("protocol",(message)=>{
15166
+ if(message.type!=="ping") return;
15167
+ browserInstance.send("protocol",{type:"pong"});
15168
+
15169
+ // DBG
15170
+ lognow("DEBUG : BROWSER CLIENT : Pong sent.");
15171
+ });
15172
+ }
15173
+
15174
+
15151
15175
  },
15152
15176
 
15153
15177
 
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.317",
3
+ "version": "0.0.319",
4
4
  "main": "aotrautils.build.js",
5
5
  "description": "A library for vanilla javascript utils (client-side) used in aotra javascript CMS",
6
6
  "author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",