aotrautils-srv 0.0.233 → 0.0.236

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 (30/07/2022-14:17:12)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (02/08/2022-02:24:54)»*/
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 (30/07/2022-14:17:12)»*/
4830
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (02/08/2022-02:24:54)»*/
4831
4831
  /*-----------------------------------------------------------------------------*/
4832
4832
 
4833
4833
 
@@ -5162,6 +5162,9 @@ WebsocketImplementation={
5162
5162
  // OLD SYNTAX : serverSocket=Socket.listen(listenableServer);
5163
5163
  serverSocket=new Socket.Server(listenableServer);
5164
5164
 
5165
+ // TRACE :
5166
+ lognow("WARN : CAUTION ! ON TODAY (01/08/2022) socket.io SERVER LIBRARY IS BOGUS AND WON'T WORK (node clients can't connect !!) IF listenableServer IS A https SERVER !!!");
5167
+ lognow("listenableServer:",listenableServer);
5165
5168
 
5166
5169
  // Setting up the disctonnect event :
5167
5170
  serverSocket.on("endConnection",()=>{
@@ -5482,22 +5485,17 @@ WebsocketImplementation={
5482
5485
  return null;
5483
5486
  }
5484
5487
 
5485
-
5486
5488
  clientSocket=new WebSocket(serverURL+":"+port,/*WORKAROUND:*/{ rejectUnauthorized:false, secure: isSecure });
5487
5489
  }else{
5488
5490
  // NOW : socket.io :
5489
5491
  //client on server-side:
5490
5492
 
5491
5493
  if(WebsocketImplementation.isNodeContext && typeof(io)!=="undefined"){
5492
- // // Node client :
5493
- // connectToServer=function (serverURL, port, isSecure, timeout=10000){
5494
- // return Socket.connect(serverURL + ":" + port,{timeout: timeout});
5495
- // }
5496
-
5494
+
5497
5495
  // OLD SYNTAX: clientSocket=Socket.connect(serverURL + ":" + port,{timeout: timeout, secure: isSecure});
5498
5496
  // NO : clientSocket=new Socket.Client(serverURL + ":" + port,{timeout: timeout, secure: isSecure});
5499
5497
  clientSocket=io(serverURL + ":" + port,{timeout: timeout, secure: isSecure, autoConnect:true});
5500
- // DOES NOT WORK : clientSocket.connect();
5498
+ // UNUSEFUL (since we have the autoconnect:true option) : clientSocket.connect();
5501
5499
  }
5502
5500
  }
5503
5501
 
@@ -5615,7 +5613,6 @@ WebsocketImplementation={
5615
5613
  // DBG
5616
5614
  lognow("DEBUG : CLIENT : doOnConnection !");
5617
5615
 
5618
-
5619
5616
  doOnConnection(nodeClientInstance, clientSocket);
5620
5617
 
5621
5618
  // We execute the listeners entry points registration :
@@ -5676,18 +5673,9 @@ WebsocketImplementation={
5676
5673
  if(!WebsocketImplementation.useSocketIOImplementation){
5677
5674
  clientSocket=new WebSocket(serverURL+":"+port,["ws","wss"]);
5678
5675
  }else if(typeof(io)!=="undefined"){
5679
- // NOW : socket.io :
5680
- // // Browser client :
5681
- // connectToServer=function (server, port, isSecure, timeout=10000){
5682
- // return io.connect(serverURL + ":" + port,{timeout: timeout});
5683
- //// ALTERNATIVE : return io(serverURL + ":" + port,{timeout: timeout});
5684
- // };
5685
- // }else{
5686
- // // TRACE
5687
- // console.log("ERROR : Could not initialize socket !");
5688
5676
  // OLD SYNTAX :clientSocket=io.connect(serverURL + ":" + port,{timeout: timeout, secure: isSecure});
5677
+ // ALTERNATIVE :
5689
5678
  clientSocket=io(serverURL + ":" + port,{timeout: timeout, secure: isSecure});
5690
-
5691
5679
  }
5692
5680
 
5693
5681
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils-srv",
3
- "version": "0.0.233",
3
+ "version": "0.0.236",
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)",