aotrautils-srv 0.0.324 → 0.0.326
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-
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (04/12/2022-14:07:52)»*/
|
|
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-
|
|
4830
|
+
/*utils SERVER library associated with aotra version : «1_29072022-2359 (04/12/2022-14:07:52)»*/
|
|
4831
4831
|
/*-----------------------------------------------------------------------------*/
|
|
4832
4832
|
|
|
4833
4833
|
|
|
@@ -5184,7 +5184,7 @@ WebsocketImplementation={
|
|
|
5184
5184
|
clientPingIntervalMillis:5000,
|
|
5185
5185
|
// clientsSockets:[],
|
|
5186
5186
|
serverSocket:serverSocket,
|
|
5187
|
-
|
|
5187
|
+
receptionEntryPoints:[],
|
|
5188
5188
|
|
|
5189
5189
|
receive:(channelNameParam, doOnIncomingMessage, clientsRoomsTag=null)=>{
|
|
5190
5190
|
|
|
@@ -5242,10 +5242,11 @@ WebsocketImplementation={
|
|
|
5242
5242
|
};
|
|
5243
5243
|
|
|
5244
5244
|
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
nodeServerInstance.receptionEntryPointsByClient[clientId].push(receptionEntryPoint);
|
|
5245
|
+
nodeServerInstance.receptionEntryPoints.push(receptionEntryPoint);
|
|
5246
|
+
|
|
5248
5247
|
|
|
5248
|
+
// // DBG
|
|
5249
|
+
// console.log("ADD RECEPTION ENTRY POINT channelName:«"+channelName+"»! nodeServerInstance.receptionEntryPoints.length:",nodeServerInstance.receptionEntryPoints.length);
|
|
5249
5250
|
|
|
5250
5251
|
|
|
5251
5252
|
return nodeServerInstance;
|
|
@@ -5346,14 +5347,10 @@ WebsocketImplementation={
|
|
|
5346
5347
|
const clientId=getUUID();
|
|
5347
5348
|
clientSocket.clientId=clientId;
|
|
5348
5349
|
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
5350
|
const doOnMessage=(eventOrMessage)=>{
|
|
5352
5351
|
|
|
5353
5352
|
// We execute the events registration listeners entry points:
|
|
5354
|
-
|
|
5355
|
-
return;
|
|
5356
|
-
foreach(nodeServerInstance.receptionEntryPointsByClient[clientId],(receptionEntryPoint,i)=>{
|
|
5353
|
+
foreach(nodeServerInstance.receptionEntryPoints,(receptionEntryPoint,i)=>{
|
|
5357
5354
|
receptionEntryPoint.execute(eventOrMessage, clientSocket, clientId);
|
|
5358
5355
|
});
|
|
5359
5356
|
|
|
@@ -5380,9 +5377,8 @@ WebsocketImplementation={
|
|
|
5380
5377
|
|
|
5381
5378
|
// On today, this method is named as same for the two implementations :
|
|
5382
5379
|
// TRACE
|
|
5383
|
-
lognow("(SERVER) Removing all listeners
|
|
5380
|
+
lognow("(SERVER) Removing all listeners for client socket «"+clientSocket.clientId+"».");
|
|
5384
5381
|
clientSocket.removeAllListeners();
|
|
5385
|
-
nodeServerInstance.receptionEntryPointsByClient[clientSocket.clientId]=[];
|
|
5386
5382
|
|
|
5387
5383
|
|
|
5388
5384
|
// TODO : FIXME : Use one single interface !
|
|
@@ -5722,8 +5718,8 @@ WebsocketImplementation={
|
|
|
5722
5718
|
|
|
5723
5719
|
const dataWrapped=WebsocketImplementation.getMessageDataBothImplementations(eventOrMessage);
|
|
5724
5720
|
|
|
5725
|
-
|
|
5726
|
-
|
|
5721
|
+
// // DBG
|
|
5722
|
+
// lognow("(CLIENT) (DEBUG) CLIENT RECEIVED SOMETHING FROM SERVER :",dataWrapped);
|
|
5727
5723
|
|
|
5728
5724
|
|
|
5729
5725
|
// Channel information is stored in exchanged data :
|
|
@@ -5986,7 +5982,7 @@ launchNodeHTTPServer=function(port, doOnConnect=null, doOnFinalizeServer=null, /
|
|
|
5986
5982
|
}
|
|
5987
5983
|
|
|
5988
5984
|
|
|
5989
|
-
|
|
5985
|
+
initNodeServerInfrastructureWrapper=function(doOnClientConnection=null, doOnFinalizeServer=null, /*OPTIONAL*/portParam, /*OPTIONAL*/certPathParam, /*OPTIONAL*/keyPathParam){
|
|
5990
5986
|
|
|
5991
5987
|
// TRACE
|
|
5992
5988
|
console.log("Server launched.");
|
|
@@ -6156,7 +6152,7 @@ initNodeServer=function(doOnClientConnection=null, doOnFinalizeServer=null, /*OP
|
|
|
6156
6152
|
// const REFRESH_SCREENSHOTS_MILLIS=500;
|
|
6157
6153
|
//
|
|
6158
6154
|
//
|
|
6159
|
-
// const server=
|
|
6155
|
+
// const server=initNodeServerInfrastructureWrapper(
|
|
6160
6156
|
// // On each client connection :
|
|
6161
6157
|
//// (serverParam, clientSocketParam)=>{},
|
|
6162
6158
|
// null,
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.326",
|
|
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)",
|