aotrautils-srv 0.0.143 → 0.0.146
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.0.0.000 (17/07/2022-
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1.0.0.000 (17/07/2022-03:28:41)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -4828,7 +4828,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
4828
4828
|
|
|
4829
4829
|
|
|
4830
4830
|
|
|
4831
|
-
/*utils SERVER library associated with aotra version : «1.0.0.000 (17/07/2022-
|
|
4831
|
+
/*utils SERVER library associated with aotra version : «1.0.0.000 (17/07/2022-03:28:41)»*/
|
|
4832
4832
|
/*-----------------------------------------------------------------------------*/
|
|
4833
4833
|
|
|
4834
4834
|
|
|
@@ -5169,22 +5169,30 @@ WebsocketImplementation={
|
|
|
5169
5169
|
execute:(clientSocketParam)=>{
|
|
5170
5170
|
|
|
5171
5171
|
|
|
5172
|
-
|
|
5173
|
-
//
|
|
5172
|
+
// With «ws» library we have no choive than register message events inside a «connection» event !
|
|
5173
|
+
// nodeServerInstance.onConnectionToClient((serverParam, clientSocketParam)=>{
|
|
5174
5174
|
|
|
5175
|
-
|
|
5176
|
-
|
|
5175
|
+
// TODO : Find a way to remove this !
|
|
5176
|
+
const doOnMessage=(message)=>{
|
|
5177
5177
|
|
|
5178
5178
|
// dataWrapped=JSON.parse(dataWrapped);
|
|
5179
5179
|
// dataWrapped=getAt(dataWrapped,0);// We get the root element
|
|
5180
5180
|
const dataWrapped=(WebsocketImplementation.useFlatStrings?JSON.parse(message):message);
|
|
5181
5181
|
|
|
5182
|
+
|
|
5183
|
+
// DBG
|
|
5184
|
+
lognow(" Channel information:dataWrapped.channelName",receptionEntryPoint.clientsRoomsTag);
|
|
5185
|
+
lognow(" Channel information:receptionEntryPoint.channelName",receptionEntryPoint.channelName);
|
|
5186
|
+
|
|
5182
5187
|
|
|
5183
5188
|
// Channel information is stored in exchanged data :
|
|
5184
5189
|
if(dataWrapped.channelName!==receptionEntryPoint.channelName) return;
|
|
5185
|
-
|
|
5186
5190
|
|
|
5187
5191
|
const clientSocket=clientSocketParam;
|
|
5192
|
+
|
|
5193
|
+
|
|
5194
|
+
// DBG
|
|
5195
|
+
lognow("receptionEntryPoint.clientsRoomsTag:",receptionEntryPoint.clientsRoomsTag);
|
|
5188
5196
|
|
|
5189
5197
|
// TODO : FIXME : Use one single interface !
|
|
5190
5198
|
// Room information is stored in client socket object :
|
|
@@ -5205,7 +5213,9 @@ WebsocketImplementation={
|
|
|
5205
5213
|
|
|
5206
5214
|
// DBG
|
|
5207
5215
|
clientSocketParam.onAny((event,args) => { console.log(`MAIS PUTAIN : ${event}:`,args); });
|
|
5208
|
-
clientSocketParam.on(channelName,(args) => { console.log(
|
|
5216
|
+
clientSocketParam.on(channelName,(args, clientSocket) => { console.log(`MAIS OSKOUR :${args} ${clientSocket}`); });
|
|
5217
|
+
|
|
5218
|
+
|
|
5209
5219
|
|
|
5210
5220
|
clientSocketParam.on(channelName, doOnMessage);
|
|
5211
5221
|
}
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.146",
|
|
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)",
|