Skip to content

Commit

Permalink
updated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Naviary2 committed Jul 11, 2024
1 parent 9b69ba1 commit 260fbed
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/client/scripts/game/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,15 +506,11 @@ const websocket = (function(){
/**
* Flags this outgoing message to, when we receive the server's response, execute a custom function.
* @param {number} messageID - The ID of the outgoing message
* @param {Function} onreplyFunc - The function to execute when we receive the server's response, or after 5 seconds of hearing no response, or immediately if the socket is terminated.
* @param {Function} onreplyFunc - The function to execute when we receive the server's response, or never if the socket closes before then.
*/
function scheduleOnreplyFunc(messageID, onreplyFunc) {
if (!onreplyFunc) return;
onreplyFuncs[messageID] = onreplyFunc
// Set a timer to execute it if the server doesn't respond.
// This will auto delete it from the onreplyFuncs list.
// And this timer won't do anything if the function has already been executed.
// setTimeout(executeOnreplyFunc, timeToAutoExecuteOnreplyFuncs, messageID)
}

/** When we receive an incoming message with the `replyto` property specified,
Expand Down

0 comments on commit 260fbed

Please sign in to comment.