3.2.4.1 Notification That the Last $D Packet Has Been Sent

When the higher layer notifies the server that the last $D packet has been sent, the server MUST send a $E (End-of-Stream Notification) packet, except if the higher layer also indicates that a new ASF header is available, as specified in section 3.2.4.2.

If the higher layer indicates that a new ASF header is available, the server MAY send a $E packet prior to following the rules in section 3.2.4.2.

The higher layer MUST specify whether a new ASF header is forthcoming (that is, if there are additional entries in the server-side playlist) or this was the last entry in the playlist, so that the Reason field in the $E packet can be filled in correctly.

If the value of the Reason field in the $E packet is 0, and the server is using Chunked Transfer Coding, the server MUST follow the $E packet by a zero-length chunk.

If the server follows the $E packet by a zero-length chunk then after sending the zero-length chunk the server MUST send all of the responses stored in the Pending-Responses variable. The responses MUST be sent by removing the element at the head of the list in the Pending-Responses variable, sending it, and then repeating this until Pending-Responses is an empty list.

If the value of the Reason field in the $E packet is 0, and the server is not using Chunked Transfer Coding, and the server intends to keep the TCP connection open after having sent the $E packet, the server SHOULD follow the $E packet by at least 511 more $E packets. The additional 511 $E packets reduce the likelihood that intermediate proxy servers delay the delivery of the $E packet to the client.

The value of the Session-State variable in the abstract data model MUST be changed to IDLE.

The Idle-Timeout timer MUST be started.