Re: [presentation-api] Updated version of PR #238

Based on the discussion in 
https://github.com/w3c/presentation-api/issues/240#issuecomment-171928315
... I think the `closed` event now fires too early. It should signal 
that there cannot be any incoming (or outgoing of course) message 
anymore on the connection, but communication protocols usually expect 
clients to continue listening to messages as long as the closing 
handshake is not over, which means that messages may still be received
 after a call to `close()` for a short amount of time.

My initial PR #238 was phrased along these lines, introducing the 
notion of a `closed` underlying connection, which triggered the close 
procedure, and saying that the closing procedure should eventually 
render the underlying connection closed:

```
<p>
  When the underlying connection of a <a>PresentationConnection</a>
  object <var>S</var> has been <dfn dfn-for=  
  "PresentationConnection">closed</dfn>, the <a>user agent</a> MUST  
  <a>close the presentation connection</a> <var>S</var> with the  
  reason and message of the initiating procedure, if any, or with  
  <code>closed</code> as <code>closeReason</code>, and an empty  
  <code>closeMessage</code> otherwise.  
</p>  
```

This was borrowed from WebRTC:
http://w3c.github.io/webrtc-pc/#data-transport-closing-procedure

There may be other ways to phrase it.


-- 
GitHub Notification of comment by tidoust
Please view or discuss this issue at 
https://github.com/w3c/presentation-api/pull/239#issuecomment-171930500
 using your GitHub account

Received on Friday, 15 January 2016 10:42:37 UTC