aotrautils 0.0.339 → 0.0.341

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 (04/12/2022-18:19:50)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (04/12/2022-18:41:27)»*/
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 (04/12/2022-18:19:50)»*/
4830
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (04/12/2022-18:41:27)»*/
4831
4831
  /*-----------------------------------------------------------------------------*/
4832
4832
  /* ## Utility global methods in a browser (htmljs) client environment.
4833
4833
  *
@@ -11418,7 +11418,7 @@ initClient=function(isNodeContext=true, useSocketIOImplementation=/*DEBUG*/false
11418
11418
  // if(doOnError && useSocketIOImplementation /*TODO : FIXME: FOR NOW, ONLY WORKS FOR SOCKET.IO IMPLEMENTATION !'*/){
11419
11419
  //
11420
11420
  //// // DBG
11421
- //// lognow(">>> serverSocket.connected:"+serverSocket.connected);
11421
+ //// lognow(">>> serverSocket.connected:"+serverSocket.isConnected);
11422
11422
  //// lognow(">>> serverSocket:",serverSocket);
11423
11423
  //
11424
11424
  //
@@ -12949,7 +12949,7 @@ createOritaMicroClient=function(url, port, isNode=false){
12949
12949
  };
12950
12950
 
12951
12951
 
12952
- /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (04/12/2022-18:19:50)»*/
12952
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (04/12/2022-18:41:27)»*/
12953
12953
  /*-----------------------------------------------------------------------------*/
12954
12954
 
12955
12955
 
@@ -14177,7 +14177,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
14177
14177
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
14178
14178
 
14179
14179
  AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
14180
- /*utils SERVER library associated with aotra version : «1_29072022-2359 (04/12/2022-18:19:50)»*/
14180
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (04/12/2022-18:41:27)»*/
14181
14181
  /*-----------------------------------------------------------------------------*/
14182
14182
 
14183
14183
 
@@ -14624,10 +14624,9 @@ WebsocketImplementation={
14624
14624
 
14625
14625
  serverClients.forEach((clientSocket)=>{
14626
14626
 
14627
- // TODO : FIXME : Use one single interface !
14628
- if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState!==WebSocket.OPEN) return;
14629
- else if(clientSocket.connected) return;
14630
-
14627
+ if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState===WebSocket.OPEN) clientSocket.isConnected=true;
14628
+ else if(clientSocket.connected) clientSocket.isConnected=true;
14629
+ if(!clientSocket.isConnected) return;
14631
14630
 
14632
14631
 
14633
14632
  // Room information is stored in client socket object :
@@ -14878,7 +14877,7 @@ WebsocketImplementation={
14878
14877
  }
14879
14878
 
14880
14879
  // DBG
14881
- lognow("DEBUG : CLIENT : clientSocket created:"+clientSocket.connected);
14880
+ lognow("DEBUG : CLIENT : clientSocket created:"+clientSocket.isConnected);
14882
14881
 
14883
14882
 
14884
14883
  // NODE CLIENT INSTANCE :
@@ -14929,10 +14928,10 @@ WebsocketImplementation={
14929
14928
  // // DBG
14930
14929
  // console.log("(NODE CLIENT) TRYING TO SEND : clientSocket.readyState:",clientSocket.readyState);
14931
14930
 
14932
- // TODO : FIXME : Use one single interface !
14933
- if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState!==WebSocket.OPEN) return;
14934
- else if(clientSocket.connected) return;
14935
-
14931
+ if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState===WebSocket.OPEN) clientSocket.isConnected=true;
14932
+ else if(clientSocket.connected) clientSocket.isConnected=true;
14933
+ if(!clientSocket.isConnected) return;
14934
+
14936
14935
 
14937
14936
  // Room information is stored in client socket object :
14938
14937
  if(!WebsocketImplementation.isInRoom(clientSocket,clientsRoomsTag)) return;
@@ -15101,10 +15100,10 @@ WebsocketImplementation={
15101
15100
  // // DBG
15102
15101
  // console.log("(BROWSER) TRYING TO SEND : clientSocket.readyState:",clientSocket.readyState);
15103
15102
 
15104
- // TODO : FIXME : Use one single interface !
15105
- if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState!==WebSocket.OPEN) return;
15106
- else if(clientSocket.connected) return;
15107
-
15103
+ if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState===WebSocket.OPEN) clientSocket.isConnected=true;
15104
+ else if(clientSocket.connected) clientSocket.isConnected=true;
15105
+ if(!clientSocket.isConnected) return;
15106
+
15108
15107
 
15109
15108
  // Room information is stored in client socket object :
15110
15109
  if(!WebsocketImplementation.isInRoom(clientSocket,clientsRoomsTag)) return;
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.339",
3
+ "version": "0.0.341",
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)",