aotrautils-srv 0.0.445 → 0.0.447

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 (23/01/2023-23:15:47)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (25/01/2023-02:11:36)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -4864,7 +4864,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
4864
4864
 
4865
4865
 
4866
4866
 
4867
- /*utils SERVER library associated with aotra version : «1_29072022-2359 (23/01/2023-23:15:47)»*/
4867
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (25/01/2023-02:11:36)»*/
4868
4868
  /*-----------------------------------------------------------------------------*/
4869
4869
 
4870
4870
 
@@ -5229,6 +5229,7 @@ WebsocketImplementation={
5229
5229
  clientPingIntervalMillis:5000,
5230
5230
  // clientsSockets:[],
5231
5231
  serverSocket:serverSocket,
5232
+
5232
5233
  receptionEntryPoints:[],
5233
5234
 
5234
5235
  receive:(channelNameParam, doOnIncomingMessage, clientsRoomsTag=null)=>{
@@ -5241,7 +5242,7 @@ WebsocketImplementation={
5241
5242
  const receptionEntryPoint={
5242
5243
  channelName:channelNameParam,
5243
5244
  clientsRoomsTag:clientsRoomsTag,
5244
- execute:(eventOrMessage, clientSocketParam, clientId)=>{
5245
+ execute:(eventOrMessage, clientSocketParam)=>{
5245
5246
 
5246
5247
  // With «ws» library we have no choive than register message events inside a «connection» event !
5247
5248
 
@@ -5387,16 +5388,20 @@ WebsocketImplementation={
5387
5388
  // if(contains(nodeServerInstance.clientsSockets, clientSocket)) return;
5388
5389
  // nodeServerInstance.clientsSockets.push(clientSocket);
5389
5390
 
5391
+
5392
+ // CURRENT :
5393
+ // NOT GOOD :
5394
+
5390
5395
  const clientId=getUUID();
5391
5396
  clientSocket.clientId=clientId;
5397
+
5398
+
5392
5399
 
5393
5400
  const doOnMessage=(eventOrMessage)=>{
5394
-
5395
5401
  // We execute the events registration listeners entry points:
5396
5402
  foreach(nodeServerInstance.receptionEntryPoints,(receptionEntryPoint,i)=>{
5397
- receptionEntryPoint.execute(eventOrMessage, clientSocket, clientId);
5403
+ receptionEntryPoint.execute(eventOrMessage, clientSocket);
5398
5404
  });
5399
-
5400
5405
  };
5401
5406
 
5402
5407
  if(!WebsocketImplementation.useSocketIOImplementation) clientSocket.addEventListener("message", doOnMessage);
@@ -5421,6 +5426,7 @@ WebsocketImplementation={
5421
5426
  // On today, this method is named as same for the two implementations :
5422
5427
  // TRACE
5423
5428
  lognow("(SERVER) Removing all listeners for client socket «"+clientSocket.clientId+"».");
5429
+
5424
5430
  clientSocket.removeAllListeners();
5425
5431
 
5426
5432
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils-srv",
3
- "version": "0.0.445",
3
+ "version": "0.0.447",
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)",