Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

socket io add timeout

socket.timeout(5000).emit("hello", "world", (err, response) => {
  if (err) {
    // the other side did not acknowledge the event in the given delay
  } else {
    console.log(response); // "got it"
  }
});
Source by socket.io #
 
PREVIOUS NEXT
Tagged: #socket #io #add #timeout
ADD COMMENT
Topic
Name
6+8 =