aotrautils-srv 0.0.336 → 0.0.337

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:26:19)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (04/12/2022-18:41:30)»*/
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 (04/12/2022-18:26:19)»*/
4830
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (04/12/2022-18:41:30)»*/
4831
4831
  /*-----------------------------------------------------------------------------*/
4832
4832
 
4833
4833
 
@@ -5274,10 +5274,9 @@ WebsocketImplementation={
5274
5274
 
5275
5275
  serverClients.forEach((clientSocket)=>{
5276
5276
 
5277
- // TODO : FIXME : Use one single interface !
5278
- if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState!==WebSocket.OPEN) return;
5279
- else if(clientSocket.connected) return;
5280
-
5277
+ if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState===WebSocket.OPEN) clientSocket.isConnected=true;
5278
+ else if(clientSocket.connected) clientSocket.isConnected=true;
5279
+ if(!clientSocket.isConnected) return;
5281
5280
 
5282
5281
 
5283
5282
  // Room information is stored in client socket object :
@@ -5528,7 +5527,7 @@ WebsocketImplementation={
5528
5527
  }
5529
5528
 
5530
5529
  // DBG
5531
- lognow("DEBUG : CLIENT : clientSocket created:"+clientSocket.connected);
5530
+ lognow("DEBUG : CLIENT : clientSocket created:"+clientSocket.isConnected);
5532
5531
 
5533
5532
 
5534
5533
  // NODE CLIENT INSTANCE :
@@ -5579,10 +5578,10 @@ WebsocketImplementation={
5579
5578
  // // DBG
5580
5579
  // console.log("(NODE CLIENT) TRYING TO SEND : clientSocket.readyState:",clientSocket.readyState);
5581
5580
 
5582
- // TODO : FIXME : Use one single interface !
5583
- if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState!==WebSocket.OPEN) return;
5584
- else if(clientSocket.connected) return;
5585
-
5581
+ if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState===WebSocket.OPEN) clientSocket.isConnected=true;
5582
+ else if(clientSocket.connected) clientSocket.isConnected=true;
5583
+ if(!clientSocket.isConnected) return;
5584
+
5586
5585
 
5587
5586
  // Room information is stored in client socket object :
5588
5587
  if(!WebsocketImplementation.isInRoom(clientSocket,clientsRoomsTag)) return;
@@ -5751,10 +5750,10 @@ WebsocketImplementation={
5751
5750
  // // DBG
5752
5751
  // console.log("(BROWSER) TRYING TO SEND : clientSocket.readyState:",clientSocket.readyState);
5753
5752
 
5754
- // TODO : FIXME : Use one single interface !
5755
- if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState!==WebSocket.OPEN) return;
5756
- else if(clientSocket.connected) return;
5757
-
5753
+ if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState===WebSocket.OPEN) clientSocket.isConnected=true;
5754
+ else if(clientSocket.connected) clientSocket.isConnected=true;
5755
+ if(!clientSocket.isConnected) return;
5756
+
5758
5757
 
5759
5758
  // Room information is stored in client socket object :
5760
5759
  if(!WebsocketImplementation.isInRoom(clientSocket,clientsRoomsTag)) return;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils-srv",
3
- "version": "0.0.336",
3
+ "version": "0.0.337",
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)",