aotrautils-srv 0.0.123 → 0.0.126
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 (16/07/2022-
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1.0.0.000 (16/07/2022-16:00:17)»*/
|
|
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 (16/07/2022-
|
|
4831
|
+
/*utils SERVER library associated with aotra version : «1.0.0.000 (16/07/2022-16:00:17)»*/
|
|
4832
4832
|
/*-----------------------------------------------------------------------------*/
|
|
4833
4833
|
|
|
4834
4834
|
|
|
@@ -5097,7 +5097,7 @@ WebsocketImplementation={
|
|
|
5097
5097
|
},
|
|
5098
5098
|
|
|
5099
5099
|
|
|
5100
|
-
getServer:(listenableServer)=>{
|
|
5100
|
+
getServer:(listenableServer, port)=>{
|
|
5101
5101
|
|
|
5102
5102
|
if(!WebsocketImplementation.isNodeContext){
|
|
5103
5103
|
// TRACE
|
|
@@ -5120,8 +5120,8 @@ WebsocketImplementation={
|
|
|
5120
5120
|
|
|
5121
5121
|
// NOW : socket.io :
|
|
5122
5122
|
// Loading socket.io
|
|
5123
|
-
serverSocket=new Socket(listenableServer);
|
|
5124
5123
|
// OLD SYNTAX : serverSocket=Socket.listen(listenableServer);
|
|
5124
|
+
serverSocket=new Socket.Server(listenableServer);
|
|
5125
5125
|
|
|
5126
5126
|
// Setting up the disctonnect event :
|
|
5127
5127
|
serverSocket.on("endConnection",()=>{
|
|
@@ -5129,7 +5129,7 @@ WebsocketImplementation={
|
|
|
5129
5129
|
});
|
|
5130
5130
|
|
|
5131
5131
|
// ////
|
|
5132
|
-
|
|
5132
|
+
serverSocket.listen(port);
|
|
5133
5133
|
|
|
5134
5134
|
}
|
|
5135
5135
|
|
|
@@ -5432,7 +5432,10 @@ WebsocketImplementation={
|
|
|
5432
5432
|
// connectToServer=function (serverURL, port, isSecure, timeout=10000){
|
|
5433
5433
|
// return Socket.connect(serverURL + ":" + port,{timeout: timeout});
|
|
5434
5434
|
// }
|
|
5435
|
-
|
|
5435
|
+
|
|
5436
|
+
// OLD SYNTAX: clientSocket=Socket.connect(serverURL + ":" + port,{timeout: timeout, secure: isSecure});
|
|
5437
|
+
clientSocket=Socket(serverURL + ":" + port,{timeout: timeout, secure: isSecure});
|
|
5438
|
+
|
|
5436
5439
|
}
|
|
5437
5440
|
}
|
|
5438
5441
|
|
|
@@ -5793,19 +5796,19 @@ launchNodeHTTPServer=function(port, doOnConnect=null, doOnFinalizeServer=null, /
|
|
|
5793
5796
|
|
|
5794
5797
|
let listenableServer;
|
|
5795
5798
|
if(sslOptions){
|
|
5796
|
-
let httpsServer=https.createServer(sslOptions, handler).listen(port);
|
|
5799
|
+
let httpsServer=https.createServer(sslOptions, handler); // OLD : .listen(port);
|
|
5797
5800
|
// TRACE
|
|
5798
5801
|
console.log("INFO : SERVER : HTTPS Server launched and listening on port " + port + "!");
|
|
5799
5802
|
listenableServer=httpsServer;
|
|
5800
5803
|
}else{
|
|
5801
|
-
let httpServer=http.createServer(handler).listen(port);
|
|
5804
|
+
let httpServer=http.createServer(handler);// OLD : .listen(port);
|
|
5802
5805
|
// TRACE
|
|
5803
5806
|
console.log("INFO : SERVER : HTTP Server launched and listening on port " + port + "!");
|
|
5804
5807
|
listenableServer=httpServer;
|
|
5805
5808
|
}
|
|
5806
5809
|
|
|
5807
5810
|
|
|
5808
|
-
const server=WebsocketImplementation.getStatic(true, /*DEBUG*/true).getServer(listenableServer);
|
|
5811
|
+
const server=WebsocketImplementation.getStatic(true, /*DEBUG*/true).getServer(listenableServer, port);
|
|
5809
5812
|
|
|
5810
5813
|
// When a client connects, we execute the callback :
|
|
5811
5814
|
// CAUTION : MUST BE CALLED ONLY ONCE !
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.126",
|
|
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)",
|