Overview.htm
changeset 116 d59e463a9181
parent 115 14b1075d41d8
child 117 6ccb7d75a511
equal deleted inserted replaced
115:14b1075d41d8 116:d59e463a9181
   478 							<li>Wait until <a>dataSink</a> acknowledges the EOF</li>
   478 							<li>Wait until <a>dataSink</a> acknowledges the EOF</li>
   479 							<li>Fulfill <var>closePromise</var> with <code>undefined</code></li>
   479 							<li>Fulfill <var>closePromise</var> with <code>undefined</code></li>
   480 						</ol>
   480 						</ol>
   481 					</p>
   481 					</p>
   482 				</dd>
   482 				</dd>
       
   483 
       
   484 				<dt>Promise&amp;lt;undefined&gt; writeAbort(any reason)</dt>
       
   485 				<dd>
       
   486 					<p>
       
   487 						This method tells the WritableByteStream that no more data will be written to it with indication of error.
       
   488 						The details of the error will be given by <var>reason</var> argument.
       
   489 						The interpretation of <var>reason</var> is up to <a>dataSink</a>.
       
   490 						Once writeAbort() has been called on a WritableByteStream, no further method calls can be made on the WritableByteStream.
       
   491 					</p>
       
   492 
       
   493 					<p>
       
   494 						This method must run the steps below:
       
   495 						<ol>
       
   496 							<li>Let <var>abortPromise</var> be a new <a>Promise</a></li>
       
   497 							<li>Return <var>abortPromise</var>, and then continue the process the steps in this algorithm</li>
       
   498 							<li><a>Write-abort</a> <a>dataSink</a> with <var>reason</var></li>
       
   499 							<li>Wait until <a>dataSink</a> acknowledges the write-abort</li>
       
   500 							<li>Fulfill <var>abortPromise</var> with <code>undefined</code></li>
       
   501 						</ol>
       
   502 					</p>
       
   503 				</dd>
   483 			</dl>
   504 			</dl>
   484 		</section>
   505 		</section>
   485 
   506 
   486 		<section class="section">
   507 		<section class="section">
   487 			<h2>Data sink model</h2>
   508 			<h2>Data sink model</h2>
   498 					</li>
   519 					</li>
   499 					<li>
   520 					<li>
   500 						Accepts the EOF signal
   521 						Accepts the EOF signal
   501 					</li>
   522 					</li>
   502 					<li>
   523 					<li>
       
   524 						Accepts the write-abort signal with an object parameter named reason.
       
   525 					</li>
       
   526 					<li>
   503 						Notifies <a>WritableByteStream</a> of how much data the data sink can newly accept.
   527 						Notifies <a>WritableByteStream</a> of how much data the data sink can newly accept.
   504 						When and how to generate such notifications is up to data sinks.
   528 						When and how to generate such notifications is up to data sinks.
   505 						Data sinks must be able to accept data more than it notified <a>WritableByteStream</a> of.
   529 						Data sinks must be able to accept data more than it notified <a>WritableByteStream</a> of.
   506 					</li>
   530 					</li>
   507 					<li>
   531 					<li>
   508 						Notifies <a>WritableByteStream</a> of acknowledgement of the EOF.
   532 						Notifies <a>WritableByteStream</a> of acknowledgement of the EOF signal.
       
   533 					</li>
       
   534 					<li>
       
   535 						Notifies <a>WritableByteStream</a> of acknowledgement of the write-abort signal.
   509 					</li>
   536 					</li>
   510 					<li>
   537 					<li>
   511 						How to calculate an integer value <dfn>cost</dfn> of each object which the data sink can consume.
   538 						How to calculate an integer value <dfn>cost</dfn> of each object which the data sink can consume.
   512 					</li>
   539 					</li>
   513 				</ol>
   540 				</ol>