You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to be able to do a receive with a timeout, so something like
receiveWithTimeout :: Protocol p => Int -> WebSockets p (Maybe (Message p))
As far as I can tell this isn't possible with the current API, please correct me if I am wrong!
I realize this might be a little tricky: what if we have received part of a frame when the timeout occurs?
For my specific application I think I can cook up a funny workaround, so this feature isn't critical to me. But the code would be much more natural with a receive-with-timeout.
The text was updated successfully, but these errors were encountered:
Upon further reflection I should be able to just have the WebSockets thread feed all incoming data into a Chan and have a separate, ordinary IO thread read from that with timeout and readChan and do its writing using the Sink mechanism.
I'd like to be able to do a
receive
with a timeout, so something likeAs far as I can tell this isn't possible with the current API, please correct me if I am wrong!
I realize this might be a little tricky: what if we have received part of a frame when the timeout occurs?
For my specific application I think I can cook up a funny workaround, so this feature isn't critical to me. But the code would be much more natural with a receive-with-timeout.
The text was updated successfully, but these errors were encountered: