aotrautils 0.0.328 → 0.0.329

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-13:37:53)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (04/12/2022-13:55:21)»*/
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-13:37:53)»*/
4830
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (04/12/2022-13:55:21)»*/
4831
4831
  /*-----------------------------------------------------------------------------*/
4832
4832
  /* ## Utility global methods in a browser (htmljs) client environment.
4833
4833
  *
@@ -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-13:37:53)»*/
12952
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (04/12/2022-13:55:21)»*/
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-13:37:53)»*/
14180
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (04/12/2022-13:55:21)»*/
14181
14181
  /*-----------------------------------------------------------------------------*/
14182
14182
 
14183
14183
 
@@ -14534,7 +14534,7 @@ WebsocketImplementation={
14534
14534
  clientPingIntervalMillis:5000,
14535
14535
  // clientsSockets:[],
14536
14536
  serverSocket:serverSocket,
14537
- receptionEntryPointsByClient:{},
14537
+ receptionEntryPoints:[],
14538
14538
 
14539
14539
  receive:(channelNameParam, doOnIncomingMessage, clientsRoomsTag=null)=>{
14540
14540
 
@@ -14592,10 +14592,11 @@ WebsocketImplementation={
14592
14592
  };
14593
14593
 
14594
14594
 
14595
- if(!nodeServerInstance.receptionEntryPointsByClient[clientId])
14596
- nodeServerInstance.receptionEntryPointsByClient[clientId]=[];
14597
- nodeServerInstance.receptionEntryPointsByClient[clientId].push(receptionEntryPoint);
14595
+ nodeServerInstance.receptionEntryPoints.push(receptionEntryPoint);
14596
+
14598
14597
 
14598
+ // // DBG
14599
+ // console.log("ADD RECEPTION ENTRY POINT channelName:«"+channelName+"»! nodeServerInstance.receptionEntryPoints.length:",nodeServerInstance.receptionEntryPoints.length);
14599
14600
 
14600
14601
 
14601
14602
  return nodeServerInstance;
@@ -14696,14 +14697,10 @@ WebsocketImplementation={
14696
14697
  const clientId=getUUID();
14697
14698
  clientSocket.clientId=clientId;
14698
14699
 
14699
-
14700
-
14701
14700
  const doOnMessage=(eventOrMessage)=>{
14702
14701
 
14703
14702
  // We execute the events registration listeners entry points:
14704
- if(!nodeServerInstance.receptionEntryPointsByClient[clientId])
14705
- return;
14706
- foreach(nodeServerInstance.receptionEntryPointsByClient[clientId],(receptionEntryPoint,i)=>{
14703
+ foreach(nodeServerInstance.receptionEntryPoints,(receptionEntryPoint,i)=>{
14707
14704
  receptionEntryPoint.execute(eventOrMessage, clientSocket, clientId);
14708
14705
  });
14709
14706
 
@@ -14730,9 +14727,8 @@ WebsocketImplementation={
14730
14727
 
14731
14728
  // On today, this method is named as same for the two implementations :
14732
14729
  // TRACE
14733
- lognow("(SERVER) Removing all listeners and receptjion entrypoints for client socket «"+clientSocket.clientId+"».");
14730
+ lognow("(SERVER) Removing all listeners for client socket «"+clientSocket.clientId+"».");
14734
14731
  clientSocket.removeAllListeners();
14735
- nodeServerInstance.receptionEntryPointsByClient[clientSocket.clientId]=[];
14736
14732
 
14737
14733
 
14738
14734
  // TODO : FIXME : Use one single interface !
@@ -15336,7 +15332,7 @@ launchNodeHTTPServer=function(port, doOnConnect=null, doOnFinalizeServer=null, /
15336
15332
  }
15337
15333
 
15338
15334
 
15339
- initNodeServer=function(doOnClientConnection=null, doOnFinalizeServer=null, /*OPTIONAL*/portParam, /*OPTIONAL*/certPathParam, /*OPTIONAL*/keyPathParam){
15335
+ initNodeServerInfrastructureWrapper=function(doOnClientConnection=null, doOnFinalizeServer=null, /*OPTIONAL*/portParam, /*OPTIONAL*/certPathParam, /*OPTIONAL*/keyPathParam){
15340
15336
 
15341
15337
  // TRACE
15342
15338
  console.log("Server launched.");
@@ -15506,7 +15502,7 @@ initNodeServer=function(doOnClientConnection=null, doOnFinalizeServer=null, /*OP
15506
15502
  // const REFRESH_SCREENSHOTS_MILLIS=500;
15507
15503
  //
15508
15504
  //
15509
- // const server=initNodeServer(
15505
+ // const server=initNodeServerInfrastructureWrapper(
15510
15506
  // // On each client connection :
15511
15507
  //// (serverParam, clientSocketParam)=>{},
15512
15508
  // null,
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.328",
3
+ "version": "0.0.329",
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)",