Skip to content

Commit

Permalink
Merge pull request #11 from uihilab/dev-branch
Browse files Browse the repository at this point in the history
security patch check
  • Loading branch information
erazocar authored Aug 6, 2024
2 parents 2c7e65c + 91cf41b commit d1a34f5
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
16 changes: 8 additions & 8 deletions src/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,33 @@ class Configuration {
}

/**
*
* @param {*} usecases
* @method setUsecases
* @param {Array} usecases - Usecases for the library instance
*/
setUsecases(usecases) {
this.usecases = usecases;
}

/**
*
* @param {*} receiveDataTypes
* @method setReceiveDataTypes
* @param {Array} receiveDataTypes - Setter for receiving data types
*/
setReceiveDataTypes(receiveDataTypes) {
this.receiveDataTypes = receiveDataTypes;
}

/**
*
* @param {*} sendDataTypes
* @method setSendDataTypes
* @param {Array} sendDataTypes - Different data types that will be used throughout the library instance
*/

setSendDataTypes(sendDataTypes) {
this.sendDataTypes = sendDataTypes;
}

/**
*
* @returns
* @method getConfig
* @returns {Object} - Contains the configuration that will be used throughout the library instance
*/
getConfig() {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"netcdfjs": "^2.0.2",
"peer": "^0.x",
"peerjs": "^1.3.x",
"socket.io": "3.x",
"socket.io": "4.6.x",
"socket.io-client": "4.x"
},
"author": "UIHI Lab",
Expand Down
16 changes: 8 additions & 8 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class HydroRTCServer {
/**
* @method serveFile - Reads and serves a specified file to the client's response
* @memberof HydroRTCServer
* @param {Object{}} response - Response object to send data back to the client
* @param {Object} response - Response object to send data back to the client
* @param {String} filename - Path of the file to be served
* @returns {Promise<void>} Serves the HTML page
*/
Expand Down Expand Up @@ -244,8 +244,8 @@ class HydroRTCServer {
/**
* @method joinServer - Joins a peer to the existing server and gets broadcasted to the exisiting peer list.
* @memberof HydroRTCServer
* @param {Object{}} socket - Socket representing the peer's connection
* @param {Object{}} peer - Information about the joining peer.
* @param {Object} socket - Socket representing the peer's connection
* @param {Object} peer - Information about the joining peer.
* @returns {void} registers the peer on the server.
*/

Expand All @@ -270,8 +270,8 @@ class HydroRTCServer {
/**
* @method validateUser - validates that a user is already registered on the live server.
* @memberof HydroRTCServer
* @param {Object{}} socket - current socket used by the user
* @param {Object{}} data - peer data available
* @param {Object} socket - current socket used by the user
* @param {Object} data - peer data available
* @returns {EventEmitter}
*/

Expand All @@ -294,8 +294,8 @@ class HydroRTCServer {
/**
* @method streamData
* @memberof HydroRTCServer
* @param {Object{}} socket - The current socket used by the user.
* @param {Object{}} data - The peer data available.
* @param {Object} socket - The current socket used by the user.
* @param {Object} data - The peer data available.
* @emits 'data-stream'
* @description Streams the requested data to the user's socket.
*/
Expand Down Expand Up @@ -348,7 +348,7 @@ class HydroRTCServer {
/**
* @method getPeers
* @memberof HydroRTCServer
* @param {Object{}} peer - The current peer requesting the list of peers.
* @param {Object} peer - The current peer requesting the list of peers.
* @emits 'peers'
* @description Retrieves and broadcasts the list of connected peers.
*/
Expand Down
2 changes: 1 addition & 1 deletion test/server-to-peer/case-study1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

<head>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.jsdelivr.net/npm/hydrolang@1.1.7/hydrolang.js"></script>
</head>

<body>
Expand Down Expand Up @@ -68,6 +67,7 @@ <h2>Smart Data Transmission:</h2>

</body>
<script src="./node_modules/hydro-rtc/build/hydrortcclient.js"></script>
<script src="./node_modules/hydrolang/hydrolang.js"></script>
<script>

let hydroRtcClient = null
Expand Down
3 changes: 2 additions & 1 deletion test/server-to-peer/case-study1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},
"author": "UIHI Lab",
"dependencies": {
"hydro-rtc": "../../../src"
"hydro-rtc": "../../../src",
"hydrolang": "^1.1.10"
}
}

0 comments on commit d1a34f5

Please sign in to comment.