Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Side by Side Diff: runtime/bin/socket_impl.dart

Issue 8318009: Update the streams interfaces (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from ager@ Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/process_impl.dart ('k') | runtime/bin/socket_stream.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 * SocketNativeWrapper is defined in native and holds a field to store the 6 * SocketNativeWrapper is defined in native and holds a field to store the
7 * native socket object. 7 * native socket object.
8 */ 8 */
9 class _SocketBase { 9 class _SocketBase {
10 10
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 270
271 void setDataHandler(void callback()) { 271 void setDataHandler(void callback()) {
272 _setHandler(_IN_EVENT, callback); 272 _setHandler(_IN_EVENT, callback);
273 } 273 }
274 274
275 void setCloseHandler(void callback()) { 275 void setCloseHandler(void callback()) {
276 _setHandler(_CLOSE_EVENT, callback); 276 _setHandler(_CLOSE_EVENT, callback);
277 } 277 }
278 278
279 InputStream get inputStream() { 279 InputStream get inputStream() {
280 if (_inputStream === null) { 280 if (_inputStream == null) {
281 _inputStream = new SocketInputStream(this); 281 _inputStream = new SocketInputStream(this);
282 } 282 }
283 return _inputStream; 283 return _inputStream;
284 } 284 }
285 285
286 OutputStream get outputStream() { 286 OutputStream get outputStream() {
287 if (_outputStream === null) { 287 if (_outputStream == null) {
288 _outputStream = new SocketOutputStream(this); 288 _outputStream = new SocketOutputStream(this);
289 } 289 }
290 return _outputStream; 290 return _outputStream;
291 } 291 }
292 292
293 SocketInputStream _inputStream; 293 SocketInputStream _inputStream;
294 SocketOutputStream _outputStream; 294 SocketOutputStream _outputStream;
295 } 295 }
296 296
OLDNEW
« no previous file with comments | « runtime/bin/process_impl.dart ('k') | runtime/bin/socket_stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698