Refresh the messages manually
NiiightmareXD opened this issue · 4 comments
Hello, I have been testing the latency of the messages by using the 'date' function. I have noticed that there is always a delay of approximately 3 seconds between the time I send the message and the time it appears. Is there any way to refresh the messages manually to eliminate this delay?
I don't plan to implemented this myself any time soon but seeing how some channels now must be polled or you won't get updates, we'll likely need some sort of client.watch
method, yes.
Probably doing something similar as how this method is used:
Can I implement this? 🤔
You could. But I don't know how I want it to look. Some rough ideas:
- Maybe
watch
never returns and one is expected to drop the future when one is no longer interested. Updates are put in the same queue. - Maybe it's a stream that yields updates. But this could make the
next_updates
more complicated if we don't want duplicates there (as it would need to filter out "what is being watched"). - Maybe the call returns immediately. Either returning the updates or putting them in the queue. Then the user gets to choose how often and for how long to poll it.
Leaning towards the first version, but that might not be the best.
Closing this for now. I'm still not sure how this should work, but happy to reopen if interest comes up again.