-
What is the proper way for the socket.io server to know the client actually receives its emit message? If ack callack is called I assume the client has received my message, if ack is not called I assume the client did not. But how do I know ack was not called by client, e.g. how long should I wait before I can say the client failed to call ack ? socket.emit('msg', (message, ack) => { Or is there other way to know whether the client actually receives the emit message? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
OK I found https://socket.io/docs/v3/emitting-events/ has an acknowledgement timeout example. I am using 2.3 so I didn't notice the document when I asked the question. So does this mean timeout without ack the proper way to know client doesn't receive the message ? |
Beta Was this translation helpful? Give feedback.
OK I found https://socket.io/docs/v3/emitting-events/ has an acknowledgement timeout example. I am using 2.3 so I didn't notice the document when I asked the question.
So does this mean timeout without ack the proper way to know client doesn't receive the message ?