Skip to content

How to implement delay with acknowledgements? #3797

Answered by darrachequesne
shadypollen asked this question in Q&A
Discussion options

You must be logged in to vote

I think the following shoud work:

// client-side
socket.on("hello", (arg1, arg2, callback) => {
  setTimeout(() => {
    callback("hi");
  }, 2000);
});

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@shadypollen
Comment options

Answer selected by shadypollen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants