Re: [presentation-api] Would a "closing" connection state be of any use?

@tidoust `closing` state indicates that an app is not allowed to send 
any data and it should wait for receiving all remaining data if 
necessary. On the other hand, codes such as `if (connection.state === 
'connected') {...}` might be sufficient to confirm whether `send()` 
method would be available or not, and `if (connection.state === 
'closed') {...}` or `closed` event might be sufficient to know when 
all remaining data would be received.

Although `closing` state should be distinguished from `connected` and 
`closed`, eventually, explicit use of `closing` state might usually be
 unnecessary, as you mentioned.

> (TCP and WebRTC data channels have similar expectations, I believe)

Yes, SCTP (underlying transport protocol of WebRTC data channel) also 
says:

>   6)  In the SHUTDOWN-RECEIVED state, the endpoint MUST transmit or 
retransmit data and leave this state when all data in queue is 
transmitted.
> https://tools.ietf.org/html/rfc4960#section-4

-- 
GitHub Notification of comment by tomoyukilabs
Please view or discuss this issue at 
https://github.com/w3c/presentation-api/issues/240#issuecomment-172449814
 using your GitHub account

Received on Monday, 18 January 2016 07:28:26 UTC