This was a suggestion from Darin with the following use case:
When the browser receives too many websocket interface requests in a brief period of time, it may want to close some of the pipes and let the renderers know that they are closed because of throttling. However, currently there isn't a good way to convey the reason. One possible, but clumsy way is that the browser waits for a client interface on the pipe it wants to disconnect; makes a call on the client interface to tell the reason; close both pipes.
Two possible ways to support this: (1) we could make it a system API; (2) we could make it a binding-level feature, by issuing a control message that is sent right before the pipe is disconnected.
#2 seems to be a better choice, because this way we can also support disconnection reason for associated interfaces, which don't have their own message pipes.
WDYT?
Comment 1 by roc...@chromium.org
, Aug 4 2016