OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * Output is written to a given output stream. Such an output stream can | 6 * Output is written to a given output stream. Such an output stream can |
7 * be an endpoint, e.g., a socket or a file, or another output stream. | 7 * be an endpoint, e.g., a socket or a file, or another output stream. |
8 * Multiple output streams can be chained together to operate collaboratively | 8 * Multiple output streams can be chained together to operate collaboratively |
9 * on a given output. | 9 * on a given output. |
10 * | 10 * |
(...skipping 25 matching lines...) Expand all Loading... |
36 * channel immediately. Otherwise the data is buffered by the output | 36 * channel immediately. Otherwise the data is buffered by the output |
37 * stream and will be sent as soon as possible. | 37 * stream and will be sent as soon as possible. |
38 */ | 38 */ |
39 bool writeFrom(List<int> buffer, [int offset, int len]); | 39 bool writeFrom(List<int> buffer, [int offset, int len]); |
40 | 40 |
41 /** | 41 /** |
42 * Indicate that all data has been written to the output | 42 * Indicate that all data has been written to the output |
43 * stream. When all data has been written to the communication | 43 * stream. When all data has been written to the communication |
44 * channel it will be closed. | 44 * channel it will be closed. |
45 */ | 45 */ |
46 void end(); | 46 void close(); |
47 | 47 |
48 /** | 48 /** |
49 * Close the communication channel immediately ignoring any buffered | 49 * Close the communication channel immediately ignoring any buffered |
50 * data. | 50 * data. |
51 */ | 51 */ |
52 void close(); | 52 void destroy(); |
53 | 53 |
54 /** | 54 /** |
55 * The no pending write handler gets called when the internal OS | 55 * The no pending write handler gets called when the internal OS |
56 * buffers have been flushed. This callback can be used to keep the | 56 * buffers have been flushed. This callback can be used to keep the |
57 * rate of writing in sync with the rate the system can write data | 57 * rate of writing in sync with the rate the system can write data |
58 * to the underlying communication channel. | 58 * to the underlying communication channel. |
59 */ | 59 */ |
60 void set noPendingWriteHandler(void callback()); | 60 void set noPendingWriteHandler(void callback()); |
61 | 61 |
62 /* | 62 /* |
63 * The close handler gets called when the underlying communication | 63 * The close handler gets called when the underlying communication |
64 * channel has been closed. | 64 * channel has been closed. |
65 */ | 65 */ |
66 void set closeHandler(void callback()); | 66 void set closeHandler(void callback()); |
67 | 67 |
68 /** | 68 /** |
69 * The error handler gets called when the underlying communication | 69 * The error handler gets called when the underlying communication |
70 * channel gets into some kind of error situation. | 70 * channel gets into some kind of error situation. |
71 */ | 71 */ |
72 void set errorHandler(void callback()); | 72 void set errorHandler(void callback()); |
73 } | 73 } |
74 | 74 |
OLD | NEW |