Re: [w3ctag/design-reviews] HTML General Review: Web Sockets (#268)

@slightlyoff Thanks for your response!

1.5% of messages received are Blobs (as opposed to 53% ArrayBuffers). Unfortunately I don't have data about how many blob-using connections set `binaryType` explicitly. We could collect more data but my gut feeling is that we can't change the default without breaking a lot of pages. There might be something clever we could do, but my mind is blank. At least we can tell that lots of people *are* finding the right button to push.

The reader and writer objects in the streams standard have a `closed` Promise which indicates when the stream is closed. I think this idea is almost directly applicable to the WebSocket API. Successful resolution means a clean close, rejection means some kind of error.

The streams interface is a really natural way to express backpressure. I've thought about having `pause()` and `unpause()` methods on the WebSocket object to let you control when the onmessage event is fired, but it's clunky by comparison.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/268#issuecomment-408446769

Received on Friday, 27 July 2018 15:06:18 UTC